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
View the attached picture
amm1812

A. B)

B. B) 1837 Douglass joins the East Baltimore Improvement Society

C. A) offers effects when moving from one slide to the next.

Hope this helps!!


8 0
3 years ago
Given two lists: L1=[10,12,14] and L2=[20,22,24] 2
OleMash [197]

Answer:

Explanation:

(i) L1+L2  Error:

L1=[10,12,14]  

L2=[20,22,24]       # {n. 2 delete}

L1+L2  

ans =

   30    34    38

(ii) L1*2

ans =

 20    24    28

(iii) L1

L1 =

  10    12    14

8 0
3 years ago
Which font style is said to be slightly above the other line of text?
Keith_Richards [23]
I think the answer would be "superscript"
8 0
3 years ago
Read 2 more answers
3 component of a computer
madam [21]

Answer:

Hardware

software

Humanware

6 0
4 years ago
Any two differences between third and fourth generation of computer
Setler [38]

Answer:

Third generation computer use integrated circuit(IC) and it was fast and reliable.

Forth generation computer micro computer were introduced and they were highly reliable and fast.

5 0
2 years ago
Read 2 more answers
Other questions:
  • When you were configuring Encrypting File System (EFS) in the lab, a __________ on the Documents folder in the File Explorer ind
    5·1 answer
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • Virtually all webcams plug into a(n) ________ port.
    13·2 answers
  • SI TENGO: ¿R = 255, G0 =, B = 0, QUE COLOR OBTENGO?
    14·1 answer
  • During the forensic phase of a security investigation, it was discovered that an attacker was able to find private keys on a poo
    9·1 answer
  • Assume that input file references a Scanner object that was used to open a file. Which of the following while loops shows the co
    6·1 answer
  • The set of instructions that tell the computer what to do are called ____.
    13·2 answers
  • Two of the major sources used today for obtaining information to create computer maps are satellites and _____________.
    11·2 answers
  • To communicate with coworkers in the office
    10·1 answer
  • Which of the following is not hardware? wireless network router X-box 360 game controller virus scanner flat-panel monitor
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!