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
Examine the efficiency the various recovery algorithms used in deadlock handling
sineoko [7]

Solution:

The process of transaction can guarantee the reliability of business applications. Locking resources is widely used in distributed transaction management (e.g; two phase commit, 2PC) to keep the system consistent. The locking mechanism, however, potentially results in various deadlocks. In service oriented architecture, the deadlock problem becomes even worse because multiple transactions try to lock shared resources in the unexpectable way due to the more randomicity of transaction requests, which has not been solved by existing research results. In this paper, we investigate how to prevent local deadlocks, caused by the resource competition among multiple sub-transactions of a gl obal transaction, and global deadlocks from the competition among different global transactions. We propose a replication based approach to avoid the local deadlocks, and a timestamp based approach to significantly mitigate the global deadlocks. A general algorithm is designed for both local and global deadlock prevention. The experimental results demonstrate the effectiveness and efficiency of our deadlock prevention approach. Further, it is also proved that our approach provides higher system performance than traditional resource allocation schemes.

This is the required answer.

4 0
3 years ago
Which guideline should you follow when selecting the font for a presentation?
diamong [38]
Most teachers prefer you to use Arial or Times New Roman
3 0
4 years ago
A GPS is an example of a dedicated device true or false
Galina-37 [17]

Answer:

true

Explanation:

4 0
3 years ago
Which of the following correctly describes rules for setting up a Web file structure?
kramer

Forward slashes (/) are used for web address and backslashes (\) are used for file paths is the following correctly describes rules for setting up a Web file structure.

<u>Explanation:</u>

For a way to a nearby document on a Windows machine, utilize the backslash. For a way to a web asset or record situated on a UNIX based machine (incorporates Macs, Linux), use a slash.

The explanation .NET's URI utilizes forward slashes is on the grounds that it's arranging for use in an internet browser. at the point when a slash is utilized in a formal or casual book, it is intended to show the word or. The models show the importance of the forward-slash.

4 0
3 years ago
How do you return a value from a function?
rjkz [21]

Answer:

return instruction used to return a value from a function.

Explanation:

Function is a block of statement which perform the special task.

Syntax for define a function:

type name(parameter_1, parameter_2,...)

{

  statement;

return variable;

}

In the syntax, type define the return type of the function. It can be int, float, double and also array as well. Function can return the array as well.

return is the instruction which is used to return the value or can use as a termination of function.

For return the value, we can use variable name which store the value or use direct value.

4 0
3 years ago
Other questions:
  • The first time that a particular visitor loads a web site page is called a(n) _____.
    5·1 answer
  • How do i fix my this??
    12·2 answers
  • Which magazine loved their alienware test pc so much they didn't want to send it back?
    11·1 answer
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • Is an applications program is a program designed to perform a specific task for specific users
    5·1 answer
  • How we can load program on the browser window.​
    7·2 answers
  • Match the following Microsoft Windows 7 ​
    9·1 answer
  • I need help, thank you
    7·1 answer
  • Which type of network cable is commonly used to connect office computers to the local network
    13·1 answer
  • What does ADAC mean <br> pls answer quickly i will mrk brainliest
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!