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
You can customize backdrops in Scratch, adding text or freestyle drawings over the initial image
sveticcg [70]

Answer:

A. True

Explanation:

ive done this myself

https://scratch.mit.edu/projects/395142260/

3 0
2 years ago
What is the index of 7 in this list?<br> [5, 6, 10, 7, 3, 2.51]
kotykmax [81]
5 or 7 I believe Good luck!
6 0
2 years ago
Read 2 more answers
Which of the following is the best example of an installation issue
Tasya [4]

Answer:

A user made an error while trying to set up a software program.

6 0
3 years ago
Read 2 more answers
Discuss three ways you could (or currently do) use the Excel software in your personal or professional life. Provide examples an
professor190 [17]
Both in my personal and professional life, I use the Excel software in order to create tables and lists. It's much easier to do that in Excel rather than in Word, for example, because Excel was actually created for that purpose, whereas Word was created for writing, above all. I use Excel for work to create tables of various things, such as names, emails, payments, etc. whereas I use it in my personal life to create lists of things such as movies, books, etc.
3 0
2 years ago
Write passage on computer virus​
const2013 [10]
In more technical terms, a computer virus is a type of malicious code or program written to alter the way a computer operates and is designed to spread from one computer to another. A virus operates by inserting or attaching itself to a legitimate program or document that supports macros in order to execute its code.
3 0
2 years ago
Read 2 more answers
Other questions:
  • Using the expected format, of putting key information where the reader can’t find it, is an example of?
    8·2 answers
  • The syntax for multiplication function is ____________.
    8·1 answer
  • 15. The text of a desktop publishing document is often created using
    6·2 answers
  • You are having trouble closing a program. You have tried to hit the Close button, the keyboard shortcut to close the program, an
    6·1 answer
  • What is the first step in creating a maintenance ?
    7·1 answer
  • What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout &lt;&lt;
    13·1 answer
  • Evie clicks through her presentation slides and realizes they all have transition effects coming from the same location, from th
    13·1 answer
  • Video is a medium that's looks real anyways, but is real________________.
    10·1 answer
  • Write a program num2rome.cpp that converts a positive integer into the Roman number system. The Roman number system has digits I
    8·1 answer
  • Select all the correct answers.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!