1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
posledela
2 years ago
15

Please help! Use the function written in the last lesson to calculate a student's GPA. Ask them how many classes they are taking

, then ask them to enter the grades for each class and if it is weighted. Your program should then output the averaged GPA including the decimal place. Your main program must call the function. Sample Run HOw many classes are you taking? 7 Enter your Letter Grade: C Is it weighted? (1 = yes) 1 Your GPA Score is: 3 Enter your Letter Grade: D Is it weighted? (1 = yes) 0 Your GPA Score is: 1 Enter your Letter Grade: A Is it weighted? (1 = yes) 1 Your GPA score is: 5 Enter your Letter Grade: B Is it weighted? (1 = yes) 1 Your GPA Score is: 4 Enter your Letter Grade: C Is it weighted? (1 = yes) O Your GPA Score is: 2 Your weighted GPA is a 3.0
Computers and Technology
1 answer:
matrenka [14]2 years ago
8 0

We have that the resultant code  is mathematically given as

 print("Your GPA score is: %.2f" %GPAcalc(grade, resp)) #printout r

       sum += GPAcalc(grade, resp)

   print("You <em>weighted</em> GPA is a %.2f")

   main()

   input()

<h3>Program Code</h3>

Generally the code is given below

if response != 1 and response != 0:

       return sys.exit("Invalid")

   elif grade=="A" and response==1:

       return 5

   elif grade=="A" and response==0:

       return 4

   elif grade=="B" and response==1:

       return 4

   elif <em>grade</em>=="B" and response==0:

       return 3

   elif grade=="C" and response==1:

       return 3

   elif grade=="C" and response==0:

       return 2

   elif grade=="D" and response==1:

       return 2

   elif grade=="D" and response==0:

       return 1

   elif grade=="F" and response==1:

       return 1

   elif grade=="F" and response==0:

       return 0

   else:

       return sys.exit("Invalid Grade!")

def main():

   sum = 0

   num_classes = int(input("classes being taken? "))  

   for x in range(num_classes):

       grade = input("Enter your Letter Grade: ") = int(input("Is it weighted? (1 = yes) "))

       print("Your GPA score is: %.2f" %GPAcalc(grade, resp)) #printout

       sum += GPAcalc(grade, resp)

   print("You weighted GPA is a %.2f")

   main()

   input()

For more information on Coding visit

brainly.com/question/950632

You might be interested in
It’s been six months since the disk crash at CSM Tech Publishing, and the owner is breathing a little easier because you install
Semmy [17]

Answer:

Storage Spaces

Explanation:

The feature that would best accommodate his needs would be the Storage Spaces feature that has been implemented in the Windows and Windows Server systems. This feature basically takes various hard drives and combines them together, this ultimately acts as copies of each other which protect the data of each one in the unfortunate case that one of the drives tends to fail. This feature also allows you to add more drives to the existing ones with very minimal effort without restricting configuration. Which would solve the needs that are needed in this scenario.

5 0
3 years ago
Beneficios del reciclaje electrónico
kykrilka [37]

English:

Recycling, in general, is good, it saves space in landfills and prevents pollution. Because some of the materials used to make the electronic piece are made with toxic ingredients its better to recycle them instead of having them end up in our oceans. Also, some pieces of electronics contain valuable metals like gold and copper. These Metals can be reused to make new better electronics with having to use the energy and money to produce new materials  

Español:

El reciclaje, en general, es bueno, ahorra espacio en los vertederos y evita la contaminación. Debido a que algunos de los materiales utilizados para fabricar la pieza electrónica están hechos con ingredientes tóxicos, es mejor reciclarlos en lugar de que terminen en nuestros océanos. Además, algunos componentes electrónicos contienen metales valiosos como el oro y el cobre. Estos metales se pueden reutilizar para fabricar nuevos y mejores productos electrónicos con la necesidad de utilizar la energía y el dinero para producir nuevos materiales.

4 0
3 years ago
Select the correct answer.
galben [10]

Answer:

the RAM if i am not mistaking

8 0
3 years ago
Frances is rearranging her furniture. (1) Also, she is moving the heavy oak bookcase to the back bedroom. (2) She has decided to
lozanna [386]

The first sentence that seems out of the logical order is the very first sentence, i.e, Also, she is moving the heavy oak bookcase to the bedroom.

A.  1

<u>Explanation:</u>

The fact that the sentence uses words like "she" and "also" leads to this conclusion. The logical order should move in a forward direction with the sentences forming a logical sequence.

The first sentence's structure is adding details to the actions which are already in progress and hence it should not be the first sentence. It should appear after the process of moving furniture has been started and further details are being added to it.

3 0
3 years ago
Read 2 more answers
Part of implementing Ken 7 Windows Limited new enterprise resource planning (ERP) software is ensuring all workstations and serv
spayn [35]

Answer:

Explanation:

1) The Functions a software application provide to keep a web browser secured includes:

a) The web browser should always be updated, you can keep it on "automatic update" option enable on your browser settings so that it will be automatically updated whenever the browser gets an update.

b) Always keep the third party cookies disabled because of the many unauthorized and phishing sites over the internet. This leaves the browser unsafe and cause higher security risk so block all the third party sites and cookies from the browser.

2) The Functions a software application prohibit to keep a web browser secured includes:

a) Do not store passwords on your web browser, deny the "store password" option on your browser settings. This is very important Even if you store passwords on your web browser do set a very strong master password to access all the stored passwords.

b) Don't ever click on unwanted and unknown hyperlinks. There will be many unsolicited attachments, files, etc over the internet please do not open or download it unnecessarily.

3) The functions a software application should provide to keep a web server secured includes:

a) Always using an application scanner. Whenever you install or download any new applications, scan the application before accessing it or opening it.

b) Install all the security patches to keep off hackers as they are many on the internet.

4) The Functions a software application should prohibit to keep a web server secured includes:

1) Uninstall an application that has not been used for long time, because they are actually of no use.

b) There may be scripts, files, setups, codes stored on the web server unknowingly so do check it and delete all the sample scripts, files and codes from the web server.

3 0
3 years ago
Other questions:
  • A. When executing System.out.println(a1), the toString() method in the Object class is invoked.
    14·1 answer
  • What does the do not disturb button do on the iphone?
    12·1 answer
  • Ou have just set up a network that will use the tcp/ip protocol, and you want client computers to obtain ip configuration automa
    9·1 answer
  • Drive-by hacking is a computer attack where an attacker accesses a wireless computer network, intercepts data, uses network serv
    5·1 answer
  • Some computer engineering students decided to revise the LC-3 for their senior project. In designing the LC-4, they decided to c
    13·1 answer
  • A wide variety of apps are available to customize devices, which category of app does word processing software falls into?
    10·1 answer
  • Renee's creating a plan for her business's information system. What should she do after she determines the goals for her busines
    10·1 answer
  • Write a class called Person that has two data members - the person's name and age. It should have an init method that takes two
    12·1 answer
  • Cleo is new to object oriented programming. which type of action can be taken on on object?
    14·2 answers
  • Use the drop-down menus to complete the statements about Search Folders.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!