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]
2 years ago
15

7.5 Code practice Plz answer ASAP

Computers and Technology
1 answer:
stiv31 [10]2 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
Periodically adding, changing and deleting file records is called file. A) Updating B) Upgrading C) Restructuring D) Renewing E)
igomit [66]
Periodically adding, changing and deleting file records is called file updating. The correct answer is A. 
4 0
3 years ago
Read 2 more answers
How was kapilvastu named​
mixas84 [53]

Answer:  Kapilvastu was named after Vedic sage Kapilamuni

4 0
3 years ago
Suzy lives alone in New York, whereas her family lives in Florida. It is difficult for Suzy to visit her family very frequently,
Luda [366]
Answer:

<span>Skype.

---> Skype can most probably help Suzy given that the application allows for people to message, talk and video chat. This means that Suzy can see her family through video call, and see their face.

Best of wishes! xx :)</span>
4 0
3 years ago
Read 2 more answers
PLZZZZ I NEED THE ANSWER NOW PLZZZZ!!!!!!!!!!!!!!!!!!!!!!!!! Which one of the following is considered a peripheral? A Software B
kaheart [24]

D is the answer  motherboard is correct

3 0
3 years ago
MODS ONLY answer this, I have something for you. I'm reporting this to make it easier
aliya0001 [1]

Answer:

whyyyyy

have  a good day :)

Explanation:

7 0
3 years ago
Other questions:
  • On January 1, 1980, Moises deposited $1850 into a savings account paying 5.6% interest, compounded quarterly. If he hasn't made
    9·2 answers
  • On an open book test, Anna was asked to predict how American laws may affect the Mexican way of life if the US Constitution was
    15·1 answer
  • According to COSO, which of the following components addresses the need to respond in an organized manner to significant changes
    14·1 answer
  • Can someone help please
    12·1 answer
  • Similarites between hardware and software
    9·1 answer
  • Write pseudocode for the question below:
    15·1 answer
  • Can i eat chicken and you shut
    14·2 answers
  • Apply the Fill - Teal, Accent 4, Soft Bevel text effect (the 5th
    12·1 answer
  • Does anybody have the answer for 2.19.6 checkerboard for codehs??
    9·1 answer
  • What technology would a bank's website use a scramble information as it is transmitted over the Internet
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!