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
galina1969 [7]
3 years ago
6

Suppose we have a dictionary called grades as shown below:

Computers and Technology
1 answer:
mihalych1998 [28]3 years ago
6 0

Answer:

import statistics as st # importing statistics package to calculate mean as st.

grades = {"John": [87,90,86.8], "Mary": [78, 81.5, 88.6],"Susan":[45,67,76]}

for key,value in grades.items():#iterating over the dictionary

   average_score=st.mean(value)#calculating the mean of every student

   gr="" empty string to store the grades

   if average_score>=90: # nested if else if and statements for the grades in gr

       gr="A"

   elif average_score>=80.0 and average_score<90.0:

       gr="B"

   elif average_score>=70.0 and average_score<80.0:

       gr="C"

   elif average_score>=60.0 and average_score<70.0:

       gr="D"

   else :

       gr="F"

       

   print(str(key)+" "+str(average_score)+" "+str(gr)) #printing grades of every student.

Output:-Mary 82.7 B

John 87.93333333333334 B

Susan 62.666666666666664 D

Explanation:

1.In this program we are iterating over the dictionary grades.

2.Storing and calculating the mean of the scores of every student us statistics package.

3.Storing the grade in string gr and updating the gr according to the mean score

4.After that printing the grade of the student with their name and mean score.

You might be interested in
Write an expression that evaluates to true if the value of the integer variable numberOfPrizes is divisible (with no remainder)
Marianna [84]

Answer:

numberOfPrizes%numberOfParticipants==0

Explanation:

  • Above expression includes % sign, which means mod.
  • Mod of a value with another makes the 1st value divide by 2nd and return the remainder.
  • As numberOfParticipants cant be zero (given), the answer must be a proper number.
  • If numberOfPrizes is completely divisible by numberOfParticipants then it will return 0 as shown in above expression. True case.
  • If a digit other than 0 is a result then it will be false.
5 0
4 years ago
In cell B20, enter a
zzz [600]

Answer:

かあなたは棚田やヌタほたややあはあやあやあさあ与田弥太は沙汰やあはあわあね、田やホワアラハやくださいヤアカやさ矢田かほあや体は白湯のやさた

Explanation:

なたさたらなやさゆなやさら

5 0
2 years ago
Having a low credit score can make it more difficult to: Obtain a car loan Open a new credit card Secure an apartment lease All
-Dominant- [34]

Answer:

all of the above

Explanation:

3 0
3 years ago
The new Director of Information Technology has asked you to recommend a strategy to upgrade the servers on their network. Recomm
borishaifa [10]

Answer:

servers to be upgraded are : APPLICATION AND LOAD BALANCING SERVERS

servers still appropriate to use : DNS AND DHCP SERVERS

Explanation:

The recommendations to be made in line with what the new director of information is asking for includes :

1 ) For the servers to be upgraded : The servers that requires upgrades  includes the APPLICATION SERVER and LOAD BALANCING SERVER. this is because these two servers are critical to the growth/expansion of any business, and they handle large volume of data

Recommendations on the servers upgrade includes:

Hardware : 2.3 GHz Intel Xeon Gold 5118 12-Core

CPU chip set :  Socket: FCLGA3647, Type: NSBM

Speed : processor 3.2 GHz

caching:   > 100 Gb

2)  For servers that do not necessarily need to be upgraded : The servers that do not need immediate upgrade are DNS and DHCP

6 0
3 years ago
What is the basic similarities and difference between the three project life cycles model? ​
MAVERICK [17]

Answer:

Project life cycle is the time taken to complete a project, from start to finish.

The three project life cycles model include the following:

  • Predictive
  • Iterative and Incremental
  • Adaptive

Explanation:

Predictive project life cycles model: In this stage, the three major constraints of the project which are the scope, time and cost are analyzed ahead of time and this analysis is well detailed and the detailed scope of the project is done right from the start of the project.

Iterative and Incremental life cycles model: In this iterative and incremental model, the project is again split into stages that can be sequential or overlapping and at the first iteration of the project, the scope is determined ahead of time.

Adaptive life cycles model: Also in this stage, the project is split up into phases but because these phases are more rapid and ever changing unlike the other models, the processes within the scope can work in parallel.

Similarities

  • They make use of high level planning.
  • They are sequential and overlapping.
  • They make use of high level scope.

Differences

  • The predictive life cycle model makes use of a detailed scope at the beginning of a project while the other models make use of detailed scope only for each phase.
  • In predictive life cycle model, the product is well understood, in other models, the projects are complex and not easily understood.
  • There is periodic customer involvement in predictive and interative life cycle model while the customer involvement in the adaptive model, the customer model is continuous.

3 0
3 years ago
Other questions:
  • How many hours did it take supercomputer to calculate pi?
    6·1 answer
  • Which of the following represents the bus topology? Multiple Choice All devices are connected to a central device, called a hub.
    8·1 answer
  • Create an array of strings. Let the user decide how big this array is, but it must have at least 1 element. Prompt them until th
    8·1 answer
  • Does Android have text-to-voice?
    11·1 answer
  • ________ is the standard communications protocol used on most client/server networks.
    9·1 answer
  • Who plays rocket league on xbox?
    15·2 answers
  • what is invention and inovation do more responsible think for making computer a succsessful product?explain​
    15·1 answer
  • ________ was one of the first uses of the Internet
    15·2 answers
  • Your task is to build a palindrome from an input string.A palindrome is a word that readsthe same backward or forward. Your code
    12·1 answer
  • Who is this person?<br><br><br> Kaneppeleqw. I see them everywhere. Are they a bot? Are they human?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!