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
What is the significance of the scientific method?
Gnom [1K]
Hello there! The significance of the scientific method is that it ensures accuracy and it ensures that the experiment was done in the right order.

The scientific method is a widely accepted way of revising and rechecking the work of scientists to see if:

1. The answers match up

2. The experiment was performed correctly

3. The results are accurate

Through the scientific method, the probability is very high that things will not go wrong. The significance of this is that if the scientific method is not applied to an experiment, nobody knows the results. If nobody knows the results, there are many possible unintended consequences that could happen. Hope this helps!
6 0
1 year ago
Select the correct answer. Linda has written a program that works well on various operating systems, but she needs to increase t
FinnZ [79.3K]
The best answer in this case to improve readability of the program is for Linda to improve the structure (Answer C). Code structure in a program can help convey logic and make the code much more readable to the user. This can include things like using tabs and spacing more effectively, and adding functions that can be called instead of repeating the same lines of code in order to repeat a certain process.
8 0
3 years ago
Given two variables matric_age and grad_age, write a statement that makes the associated value of grad_age 4 more than that of m
bearhunter [10]

Answer:

grad_age=matric_age+4

Explanation:

As mention in the question their are two variable matric_age and grad_age respectively .The grad_age variable store the value of 4 more than that of matric_age i.e (matric_age+4) means that it store the value 4 plus matric_age Suppose a matric_age is initialized with 4 then value of grad_age=4+4=8.

8 0
3 years ago
What is the correct sequence in which a computer operates​
GrogVix [38]

Answer:

Booting is a startup sequence that starts the operating system of a computer when it is turned on. A boot sequence is the initial set of operations that the computer performs when it is switched on. Every computer has a boot sequence.

8 0
3 years ago
Different Betweens ServerPc And Desktop Pc ~
Andrew [12]

Answer:

<em>Science is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe. The earliest roots of science can be traced to Ancient Egypt and Mesopotamia in around 3000 to 1200 BCE.</em>

Explanation:

<em>"</em><em>serverPc </em><em>izz </em><em>serverPc</em>

<em>Desktop</em><em> </em><em>Pc</em><em> izz</em><em> </em><em>Desktop</em><em> </em><em>Pc"</em>

8 0
3 years ago
Other questions:
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    13·1 answer
  • Which of the following jobs is considered part of the information technology industry?
    15·2 answers
  • A thin red border indicates the active cell. (True or False)
    12·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    8·1 answer
  • Public class Main{ public static void main(String [] args){ String name=WelcomeJava; Runnable r1=() -&gt; System.out.println(nam
    12·1 answer
  • What is the data type of the following expression?
    12·2 answers
  • (a) Write a program which calculates and displays the obtained marks, percentage in six subjects and assigns grades based on per
    6·1 answer
  • You are developing a Website that is going to be viewed extensively on smartphones and tablets. Which of the following should yo
    7·1 answer
  • Ok so I’m using a word document and towards the bottom of the page it stops me from moving my text box any further down even tho
    13·2 answers
  • Each of the flowchart segments in Figure 3-24 is unstructured. Redraw each segment so that it does the same processes under the
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!