Write a method named printGPA that takes in as a parameter a Scanner to read in user input, and calculates a student's grade point average. The user will type in input containing the student's name, then a number of scores, followed by that many integer scores. Then, the method will print out the average of all grades entered. Here are two example dialogues: Enter a student name: Maria Enter the number of courses: 5 Course 1 Grade: 72 Course 2 Grade: 91 Course 3 Grade: 84 Course 4 Grade: 89 Course 5 Grade: 78 Maria's grade is 82.8 Enter a student name: Jordan Enter the number of courses: 4 Course 1 Grade: 86 Course 2 Grade: 71 Course 3 Grade: 62 Course 4 Grade: 90 Jordan's grade is 77.25

Answers

Answer 1

import java.util.Scanner;

public class JavaApplication40 {

   public static  void printGPA(Scanner scan){

       System.out.println("Enter a student name:");

       String name = scan.nextLine();

       System.out.println("Enter the number of courses:");

       int courses = scan.nextInt();

       double total = 0;

       for (int i = 1; i <= courses; i++){

           System.out.println("Course "+i+" Grade:");

           double grade = scan.nextDouble();

           total += grade;

       }

       System.out.println(name+"'s grade is "+(total/courses));

   }

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       printGPA(scan);

   }

   

}

I hope this helps!


Related Questions

____________________________ and _________________________ are 2 negative impacts of the internet on businesses.

A)Unlimited Availability and Low Confidence in the business


B)Competition and Poor Impersonality


C)Competition and Unlimited Availability


D)Low Confidence in the business and Improved Communication

Answers

Answer:

i no you its me remember and the answer is b.

Explanation:

who are the characters in the poem Padre power witness the execution of rizal​

Answers

I MASTURBATE ON WEBCAM FIND ME HERE sex-today.fun

Channel logging tokens can be set to all but:________. a. Relaxed b. Strict c. Both versions d. None

Answers

Answer:

c. Both versions

Explanation:

The Windows Remote management has hardening levels that could be set to Relaxed, Strict, or None based on the channel binding token associated with a request. This feature could be automatically found in the system or manually configured to a user's choice.

Relaxed settings mean rejection of channel binding token that are not valid and the acceptance of requests with no channel binding tokens, but which may be susceptible to attacks. Strict settings entail an automatic rejection of invalid channel binding tokens. None settings entail the acceptance of all requests with no protection against credential-forwarding attacks.

Which of these are steps in the testing cycle? Check all of the boxes that apply.

testing the fixed code

releasing debugging version

fixing the error

reproducing and diagnosing the error

Answers

Answer:

A,C and D

Explanation: You're welcome

Answer:

A and D

Explanation:

Using the programming language of your choice, implement the Binary Search algorithm for a target value = 9 on the Array A: [9, 11, 70, 25, 20, 0, 36, 24]. What is the primary condition to implement a Binary Search Algorithm? Explain the growth rate of the algorithm

Answers

Answer:

myArray  = [9, 11, 70, 25, 20, 0, 36, 24]

myvalue = 20

def binary_search(mylist, value):

   sorted(mylist)  

   mid = mylist[round(len(mylist) / 2)]

   if value == mid:

       return mylist.index(mid)

   elif value < mid:

       for index, s_one in enumerate(mylist[ : (mylist.index(mid))]):

           if s_one == value:

               return index

   elif value < mid:

       for index, s_two in enumerate(mylist[(mylist.index(mid)) : ]):

           if s_two == value:

               return index

   else:

       return "searched value not in list/array"

result = binary_search( myArray, myvalue)

print(f"Index of the searched value {myvalue} is: {result}")

Explanation:

The programming language used above is python. It is used to implement a binary search in a list and finally returns the index of the searched value.

which best explains the relationship among these three facts question 8

Answers

Answer:

no attachment

Explanation:

Consider sending a 2400-byte datagram into a link that has an MTU of 700 bytes. Suppose the original datagram is stamped with the identification number 422. How many fragments are generated

Answers

Answer:

4

Explanation:

Given the following data

Datagram = 2400 bytes

The minimum length of an IP header = 20

Maximum Transmission Unit - MTU = 700

The original datagram is stamped with the identification number = 422

Formula = The required number of fragments = ( Datagram - IP Header) ÷ (MTU - IP Header)

= (2400 - 20) ÷ (700 - 20)

= 2380 ÷ 680

= 3.5 ≈ 4

Hence, in this case, the correct number of fragment generated is 4.

which is the best software application to be used by a hotel manager​

Answers

Answer:

Cloudbeds

:))

hope it helps

Which traits are common in all four career pathways of the Information Technology field? Check all that apply.

A)accuracy and attention to detail
B)problem-solving and critical-thinking skills
C)knowledge of programming language
D)ability to work independently
E)ability to protect confidential information
F)ability to learn quickly

Answers

I would say all of the above

Answer:

Abcd

Explanation:

what are the advantages of using a folder?​

Answers

Answer:

1. easy access to files

2. better organization

Explanation:

Use your editor to open the cc_data.js file and study the data stored in the staff object to become familiar with its contents and structure. Close the file, but do not make any changes to the document.

Answers

Answer:Use your editor to open the tny_july_txt.html and tny_timer_txt.js files from the ... 3 Take some time to study the content and structure of the file, paying close ... the nextJuly4() function, insert a function named showClock() that has no parameters. ... Declare a variable named thisDay that stores a Date object containing the ...

Explanation:

Which statement is true? A. Pseudocode uses shapes such as rectangles and diamonds to plan a program. B. You only use comments for pseudo code. C. A flowchart uses comments that can be kept as a permanent part of a program. D. A comment line begins with # Please hurry also you can only choose one answer so idk which one thank you

Answers

Answer:

D) A comment line begins with #

Explanation:

Comments are used in programming to explain what a line or block of code is doing.

It helps the programmer easily remember what their code was about when they come back to it having left it for a while.

Also comments help other programmers understand code written by one programmer.

A comment or an in-line comment usually begins with #. That way the computer skips it and doesn't regard it as a line of code.

Answer: D. A comment line begins with #.

Explanation:

In the text, it stated, "The easiest way to add a comment is to start the line with the pound sign (#)."

(Comments are notes that allow you to write anything without affecting the code itself. Comments can be utilized to indicate when and how you later changed a program, and provide a description of the changes.)

I hope this helped!

Good luck <3

Any suggestions on how to write the following Python code?


1. Write a Python code to save the following list in a CSV file

ls = [“Hello”, “Hi”, “bye”]

2.Write a Python to read the CSV file generated in the previous step (1) to a Python list.

Help would be much appreciated.

Answers

Answer:

Hi

Explanation:

Partner Exercise: Implement a class Car with the following properties. A car has a certain fuel efficiency (measured in miles/gallon or liters/km – pick one) and a certain amount of fuel in the gas tank. The efficiency is specified in the constructor, and the initial fuel level is 0. Supply a method drive that simulates driving the car for a certain distance, reducing the amount of gasoline in the fuel tank. Also supply methods getGasInTank(), returning the current amount of gasoline in the fuel tank, and addGas(), to add gasoline to the fuel tank. Sample usage: Car myHybrid = new Car(50); // 50 miles per gallon myHybrid.addGas(20); // Tank 20 gallons myHybrid.drive(100); // Drive 100 miles double gasLeft = myHybrid.getGasInTank(); // Get gas remaining in tank You may assume that the drive method is never called with a distance that consumes more than the available gas. Supply a CarTester class that tests all methods.

Answers

50:20 I got it right

PLEASE HELPP
Why do you think it is important to write your high school plan in middle school? Explain your answer in 3-4 well written sentences.

Answers

Answer:

Es muy importante que escriba su plan para la escuela secundaria antes de llegar a la escuela secundaria. Te da algo a lo que admirar cuando llegas a la escuela secundaria. Cuando lo complete, sabrá que hizo algo bien. Entonces puede establecer sus metas cada vez más altas, dándole la oportunidad de una buena vida.

I have put the question in twice and I cannot get a answer for it .. this site isn’t great in my view..

Answers

which site? Maybe try to turn off your device and turn it on again then go back to the website

Please help I don’t know

Answers

Answer: Go down 1 time, then to the left 3 times, then down 1, finally, go left 1 time.

Explanation:

Assume a branch instruction bne $t1, $t2, Label is located in 0x00001840 in the instruction memory. The 16-bits branch address is 0x000C, If the branch is taken, what will be the new Program Counter (PC) value?

a. 0x00001844
b. 0x00001850
c. 0x00001870
d. 0x00001874

Answers

Answer:

a. 0x00001844

Explanation:

When the branch is takes the new program counter value is increased by 1. The value of existing memory is labelled with number sets and then next instruction is accepted in sequence. The new value is the increase in the current labelled value.

Implement a Java program that creates math flashcards for elementary grade students. User will enter his/her name, the type (+, -, *, /), the range of the factors to be used in the problems, and the number of problems to work. The system will provide problems, evaluate user responses to the problems, score the problems, and provide statistics about the session at the end. Functional Requirements

• User enters name at the beginning of a session. • System covers four math operations – addition, subtraction, multiplication, and division – with the user choosing which of the four operations to do in the session. Only 1 type of problem can be done in each session. • User will enter additional session parameters from prompts – number of problems to work and the range of values desired in the problems, e.g., addition with factors ranging from 0 to 12. • System will present problems to the user. • User will respond to problems with an answer and the system will provide im

Answers

import java.util.Scanner;

public class JavaApplication44 {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter you name: ");

       String name = scan.nextLine();

       System.out.print("Enter your operation (+,-,*,/): ");

       String operator = scan.nextLine();

       System.out.print("Enter the range of the problems: ");

       int ran = scan.nextInt();

       System.out.print("Enter number of problems: ");

       int problems = scan.nextInt();

       int score = 0;

       for (int i = 1; i <= ran; i++){

           int first = (int)(Math.random()*ran);

           int sec = (int)(Math.random()*ran);

           System.out.print("Problem #"+i+": "+first + " "+operator+" "+sec+" = ");

           int ans = scan.nextInt();

           if (operator.equals("+")){

               if (ans == first + sec){

                   System.out.println("Correct!");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first+sec));

               }

           }

           else if(operator.equals("-")){

               if (ans == first - sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first - sec));

               }

           }

           else if (operator.equals("*")){

               if (ans == first * sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first * sec));

               }

           }

           else if (operator.equals("/")){

               if (ans == first / sec){

                   System.out.println("Correct");

                   score++;

               }

               else{

                   System.out.println("Wrong. The correct answer is "+(first / sec));

               }

           }

           

       }

       System.out.println(name+", you answered "+score+" questions correctly.");

   }

   

}

I hope this helps!

Using Python Write an expression using Boolean operators that prints "Special number" if special_num is -99, 0, or 44.

Sample output with input: 17
Not special number

Answers

special_num = int(input())

if special_num == -99 or special_num == 0 or special_num == 44:

   print("Special number")

else:

   print("Not special number")

I wrote the code so that the user enters a number of their choice. Best of luck.

How is a UDP socket fully identified? What about a TCP socket? What is the difference between the full identification of both sockets?

Answers

Answer:

Following are the solution to this question:

Explanation:

Two tuples were fully identified only with UDP socket.:

< IP address assigned, the port for destination >

Its two tuples have been used in UDP as demux, buttons to identify its UDP socket.

The IP address for the destination:

Its received data is directly provided by the IP address of its port.

Port number of the destination:

The function of the IP address of its port number whenever you obtain a UDP segment would be to control the IP addresses of a segment or send that segment to a port with the same IP address. Its port number for endpoint allows demultiplexing incoming information from its IP.

TCP socket is completely recognized by the following four tuples:

< source IP, port source, IP source, port location >

It tuples are being used to label the sockets by using a demultiplexing (demux) key.

IP address source:

The IP address is being used to identify the unique host that links to. It can assume that perhaps the source IP address shows us all the source Addresses of the sender.

Port number of source:

Its port number amount allows us to identify which section is arriving at which port.

IP address destination:

Its IP address of a destination is the IP address of a port accepting incoming information.

Port number of the destination:

It is port numbers number allows us to identify the facilities or section should be sent to.

Differentiation between TCP and UDP identifier:  

As TCP ports (4 tuples) and UDP ports (2 tuples) are using demux keys to define socks, however, demux keys in UDP are unique from others in TCP for both the following reasons:

TCP uses a separate socket for every contact between both the server and client whereas UDP utilizes its same sockets to process all clients accessed by UDP servers with all communications, it maintains TCP is much more dependable and hence has to hold a different port.

Even so, UDP doesn't accomplish things apart from multicasting and demodulation, but no separate port is necessary by each link. Therefore the TCP socket becomes connection-driven as well as the UDP socket is direct link-free.

There are different ways' to identify the Socket. The presence or absence of a connection needs that the identifier format of each socket are known to be very different.

The TCP socket is identified by the quadruple. This includes;

Source IP addressSource port numberDestination IP addressDestination port number

An UDP socket is identified by the tuple such as

Destination IP addressDestination port number

There are some difference between TCP socket and UDP socket. They are;

TCP is known to be a connection-oriented protocol but the UDP is a connectionless protocol.

Another difference between TCP and UDP is speed. TCP is said to be slower than UDP. UDP is said to be faster, simpler, and efficient protocol than TCP.

Learn more about TCP socket from

ainly.com/question/17387945

what is the purpose of the new window command

Answers

Answer:

.

Explanation:

Answer:

It opens one of the current worksheets into a new window.

Explanation:

got it correct

An example of a _________________ impact is when a consumer wants to buy a product on the internet but is afraid the company won’t fulfill their request due to an unsure reputation of that business.

A)Negative


B)Positive

Answers

Answer:

ooof

Explanation:

Answer:

B) negative

Explanation:

the evidence shown "unsure reputation of that business"

For the function below, which variables have the same scope?

def square(numA, numB):

return numA ** numB

base = 5
power = 2
answer = square (base,power)
print(answer)


numA and power

power and base

numB and power

base and numA

Answers

Answer:

numB and power

Explanation:

Correct answer edge 2020

The variables have the same scope for the given function is power and base. The correct option is B.

What are variables?

A variable in mathematics is a symbol and placeholder for any mathematical object. A variable can specifically represent a number, a vector, a matrix, a function, a function's argument, a set, or an element of a set.

A variable in computer programming is an abstract storage location with an associated symbolic name that contains some known or unknown quantity of information referred to as a value; or, to put it another way, a variable is a named container for a specific set of bits or type of data.

Because power and base are declared in the same container, they have the same scope. Because they are not present in a function, their scope is said to be global.

Thus, the correct option is B.

For more details regarding variables, visit:

https://brainly.com/question/17344045

#SPJ2

The string expression strVar.____________________ starts at index pos, replaces the next n characters of strVar with all the characters of str.

Answers

Answer:

strVar.replace(pos, n, str);

Explanation:

The strVar.replace() is a javascript function of searching and replacing a string for a defined value, whereby it finds and returns a new string where the defined values are replaced.

For example: to return a string where "Trump" is replaced with "Biden":

We have

var str = "Welcome Trump!";

var res = str.replace("Trump", "Biden", str);

Hence, in this case, the correct answer is strVar.replace(pos, n, str);

A Python programmer is writing a function definition. What syntax should be used?
def( statement ): functionName
argument1
argument2
argument3
def functionName( arguments ):
statement1
statement2
statement3
def functionName( statement ):
argument1
argument2
argument3
def( arguments ): functionName
statement1
statement2
statement3

Answers

Answer:

Python - Functions

Advertisements

A function is a block of orgaof code that is used to perform a single, related action. Functions provide better modularity for your application and a high degree ofAdvertisement

As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.

Defining a Function

You can define functions to provide the required functionality. Here are simple rules to define a function in Python.

Function blocks begin with the keyword def followed by the function name and parentheses ( ( ) ).

Any input parameters or arguments should be placed within these parentheses. You can also define parameters inside these parentheses.

The first statement of a function can be an optional statement - the documentation string of the function or docstring.

The code block within every function starts with a colon (:) and is indented.

The statement return [expression] exits a function, optionally passing back an expression to the caller. A return statement with no arguments is the same as return None.

Answer:

def functionName( arguments ):

statement1

statement2

statement3

Explanation:


Martin is responsible for translating the script into a visual form by creating a storyboard. Which role is he playing?
Martin is playing the role of a(n)

Answers

Answer:

The correct answer to this question is given below in the explanation section.

Explanation:

The question is about to  identify the role of Martin, who converts script into visual form by creating a storyboard.

The correct answer to this question is:

Martin is playing the role of Production Design and he is working at the position of the production designer.

Before shooting a film, the production designer is the first artist who converts script into a visual form such as creating storyboards. And, that storyboard serves as the first film draft.

A storyboard is a series of sketches, paintings, etc arranged on a panel to show the visual progress of the story from one scene to the next.   These storyboards are used from start to finish of the film. Because these storyboards or sketches serve as the visual guide for the director of the film throughout the production.  

Answer:

Hi

Explanation:

THE ANSWER UP TOP IS WRONG LIKE DEAD WRONG

a good look of a web page depends upon?​

Answers

Answer: See explanation

Explanation:

• Font size: The font size used matters a lot in order to enhance readability. The ideal font size should be 16 pixel for the main body text. This is vital in order to help enhance readability. It should be noted that a don't size that is lower or higher than that can lead to challenges with readability.

• Graphics and animation: Using of exciting graphics and animations on a website can help in giving the web page a good look, help in grabbing the attention of the user, and also increase engagement.

• Use of colours: The color chosen also helps to give a web page a good look. It should be noted that when choosing colors, it is ideal to choose two or at most three colors to use for a web page. Mixing different colors or using very bright colors is typically a turn off.

do you think your future career will continue to become more and more reliant on computers and is it a good thing to depend so fully on computers to help with work skills and careers​

Answers

There are good and bad, some people rely on computers, and some people need him to help them find information.

I personally think many future careers will continue to become more reliant on computers, however maybe not every single one.

I wouldn’t say it’s a good thing to depend so fully on computers but I also wouldn’t say it’s a bad thing either.

You probably shouldn’t rely on a computer 100% because it’s essentially important to know how things work on your own rather than depending on a computer all the time. While it can be a good thing. Like cashiers can print out a receipt rather than writing it out and consuming more time.

What is the most effective way to identify improvement opportunities for value log

Answers

Answer:

Performance Improvement (PI) Champion performs Value Stream Mapping and identifies improvement opportunities

Explanation:

Performance Improvement (PI) Champion performs Value Stream Mapping and identifies improvement opportunities.

In other words, Value stream mapping is a strategy that is used to break down situations into pieces such as people, information, and materials involved in delivering services.

To do this, a distinct categorization is made into a value-adding category and a non-value-adding category. This helps to determine which elements add value to customers or not.

Thereby, removing unnecessary processes or steps which in turn increases productivity and value.

Other Questions
Which expression is represented by this model?1413=1121312=161416=1241412=18 . When 12 is subtracted from 4 times a number, the result is 24. Which equation can be used to find the number? What graph shows the linear equation y = 1? If there is a net loss there will be a ___________ balance in the Income Summary account after all closing entries have been posted.a. Debitb. zeroc. Creditd. not determinable Find the value of X PLEASE What is the range of: 21, 35, 17, 27, 32, 12 and 30 PLEASE ANSWER I HAVE ABOUT 30 MINUTES TO AN HOUR TO FINISH THIS Which metallic crystal structure has a coordination number of 8 Which ordered pairs in the form (x, y) are solutions to the equation 3x4y=21?Select each correct answer.(3, 3)(7, 0)(1, 6)(11, 3) He cafeteria at Midtown Middle School surveyed 575 students about their favorite food. If 8% of the students surveyed liked chicken, how many students said that chicken is their favorite food? Mikaila collected 27 pounds of glass bottles to bring to the recycling center. she also collected 400 ounces of newspapers and 160 ounces of aluminum cans. what is the total weight of the items Mikaila brought to the recycling center? write your answer in ounces. think you! element that is the "best" at removing electrons from other atoms. Which symbol from Roll of Thunder, Hear My Cry provides the MOST support for the storys message about family ties and loyalty?Staceys wool jacketUncle Hammers PackardT.J.s cheat notesthe October rain Development in the vast majority of countries in Latin America is __________.A.among the highest in the worldB.at or higher than the global averageC.among the lowest in the worldD.either very high or very low; few countries are at the global average Like 8 points Please help A community ruled by another country, not by its own people. PLEASEEEEE HELPPPPPP ASAPPPPP Read the passage from Dyaspora.When you are in Haiti they call you Dyaspora. This word, which connotes both connection and disconnection, accurately describes your condition as a Haitian American. Disconnected from the physical landscape of the homeland, you dont grow up with a mango tree in your yard, you dont suck kenps in the summer, or sit in the dark listening to stories of Konp Bouki and Malis. The bleat of vaksins or the beating of a Yanvalou on Rada drums are neither in the background or the foreground of your life. Your French is nonexistent. Haiti is not where you live.What is the authors purpose in this passage?A.) to persuade readers that the experience of Haitian immigrants is difficultB.) to persuade readers that life in Haiti is better than life in the United StatesC.) to entertain readers with colorful details about Dyaspora and Haitian lifeD.) to inform readers about the Haitian Dyaspora and its culture Steps for solving rational equations What is the name for a substance that keepsthe pH in cells within the 6.5 to 7.5 pH range?