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
Dmitrij [34]
3 years ago
15

7.5 Code practice Plz answer ASAP

Computers and Technology
1 answer:
stiv31 [10]3 years ago
8 0

def calculate_GPA(grade, weight):

   grades = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0}

   if weight == 0:

       return grades[grade]

   else:

       return grades[grade] + 1

classes = int(input("How many Classes are you taking? "))

total = 0

for x in range(classes):

   letter = input("Enter your Letter Grade: ")

   user_weight = int(input("Is it weighted? (1 = yes) "))

   grade = calculate_GPA(letter, user_weight)

   total += grade

   print("Your GPA score is: ", grade)

print("Your weighted GPA is a",(total/classes))

I wrote my code in python 3.8. I was able to replicate the output in your picture exactly. If you need me to make any changes, I'll do my best.

You might be interested in
Which type of virus includes protective code that prevents outside examination of critical elements?
Vlad1618 [11]

Answer:

Armoured viruses

Explanation:

Armoured viruses are computer viruses that have been found to be very dangerous, Armoured viruses ar designed to protect itself against any attempt to detect or trace Its activities. They have different ways through which they bypass antivirus software applications in a computer system, making it very difficult to eliminate from an infected system.

5 0
3 years ago
what is the primary way to access applications in windows 8? a. control panel b. start menu c. desktop tiles d. context menu
kow [346]
In Windows 8, when you hit the Windows icon (in previous versions known as the start menu) it takes you to a separate page of tiles where all your applications and programs are. The easiest way to access your most needed programs and files is to create a shortcut on your desktop. This makes C. Desktop Tiles your primary way to access applications
6 0
3 years ago
How do you validate the type of text that a user enters?
enot [183]
D, is the correct choice here. 
3 0
3 years ago
It is safe to use your bright headlights if there is a car ahead of you within 300 feet
11Alexandr11 [23.1K]
The answer to that would be no
3 0
3 years ago
Read 2 more answers
Can anyone help me out with my photography questions?
Oliga [24]
Verifying, The answer above me is correct
6 0
2 years ago
Other questions:
  • Running fewer applications at once is a way to resolve which type of bottleneck?
    9·1 answer
  • In doing a load of clothes, a clothes drier uses 18 A of current at 240 V for 59 min. A personal computer, in contrast, uses 3.0
    7·1 answer
  • What is a help desk
    15·1 answer
  • Jeremy wishes to create a site map for his website. What tag will surround the URL of his home page? A. B. C. D.
    8·1 answer
  • What safety feature melts to protect a circuit? a. fuse b. diode c. three-prong plug d. transistor
    10·2 answers
  • In this challenge, write a function to add two floating point numbers. Determine the integer floor of the sum. The floor is the
    8·1 answer
  • What steps might a company or organization need take in order to keep its digital data secure online?
    8·1 answer
  • Science can give us
    5·2 answers
  • Research and build a chroot jail that isolates ssh users who belong to the restrictssh group. (You will also need to create the
    9·1 answer
  • As a member of the help desk administration team, you've been assigned to update the driver for the network adapter that is inst
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!