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
The programming interface between an application program and the dbms is usually provided by the
Inessa05 [86]
The Data Access API.
8 0
3 years ago
Need Help ASAP!
jonny [76]

Answer:

Ask about next steps and the best way to communicate.

Send a follow-up email within 24 hours.

Explanation:

3 0
3 years ago
Read 2 more answers
When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
xxMikexx [17]
<span>D - graphical user interface</span>
5 0
3 years ago
Read the scenario and answer the question. Audrey had problems with her computer software recently. One of her programs shut dow
Sophie [7]

Answer:

Refer to the troubleshooting checklist.

Explanation:

I got it right in edge:)

6 0
3 years ago
Read 2 more answers
Write a function swap that swaps the first and last elements of a list argument. Sample output with input: 'all,good,things,must
zubka84 [21]

Answer:

li=list(map(str,input().strip().split()))#taking input of the string.

#swapping first and last element.

temp=li[0]

li[0]=li[-1]

li[-1]=temp

print(li)#printing the list.

Explanation:

I have taken the list li for taking the input of strings.Then after that swapping first and last element of the list.Then printing the list.

7 0
3 years ago
Read 2 more answers
Other questions:
  • A motherboard uses dual channeling, but you have four DIMMs available that differ in size. The motherboard supports all four siz
    7·1 answer
  • Write a program called DeliveryCharges for the package delivery service in Exercise 4. The program should again use an array tha
    9·1 answer
  • _____ are used to associate a style sheet or style rule with a specific device or list of device features.â
    12·2 answers
  • Write a game that plays many rounds of Rock Paper Scissors. The user and computer will each choose between three items: rock (de
    8·1 answer
  • Calculate the total and average number from 1 to 100<br>​
    12·1 answer
  • How are keyboards applied in the real world
    13·1 answer
  • Kos-huar-utb garls jonly​
    8·2 answers
  • The term structure, as it relates to programming, refers to the decisions you make to design your program to best meet its objec
    11·1 answer
  • Who's hype for Halo Infinite?
    11·2 answers
  • What is the output for the following program?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!