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
Which social media post indicates your home may be unattended?
victus00 [196]

Answer: A

Explanation:

It clearly shows your out

8 0
3 years ago
The main thing that adjusting the aperture controls when taking an image is?
Pani-rosa [81]
The temperature controller
6 0
3 years ago
Which of the following best describes contextual design?
skelet666 [1.2K]

Answer:

B

Explanation:

3 0
3 years ago
Does trend in computing important for organization management?​
mario62 [17]

Answer:

yes it is...................

6 0
3 years ago
What is the answer to this?
Anit [1.1K]

Answer: I think the Valorous Unit Ribbon

Explanation: I don't really understand what's it asking but I sort of did to get this answer!

5 0
3 years ago
Other questions:
  • Barr the Bear has started a business to sell fish to Poe and his fellow penguins. The penguin customers submit many fish orders,
    12·1 answer
  • Investments in data networks, ip addresses, routers, and switches are ________ because of their impact on productivity, security
    14·1 answer
  • Apple was a pioneer in user interface development, introducing the _____, complete with mouse and screen icons, in the early 198
    7·1 answer
  • Google Glass uses a projector that bounces a beam of light off a prism and projects the image directly on your ________. field o
    14·1 answer
  • When security issues are a special concern, companies want to take extra steps to make sure that transmissions can’t be intercep
    7·1 answer
  • Citing Wikipedia as a reference is not considered a good practice because 1.leverages a neutral point of view. 2.hosts unopinion
    8·1 answer
  • this bar is located at the top of your computer school in.Its functions allow you to navigate the web​
    5·2 answers
  • What is the full form of 'Rom<br>​
    7·2 answers
  • Me Completan Pliiiis
    10·2 answers
  • What is another term used for next generation firewalls
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!