Question: PARTICIPATION ACTIVITY 5 . 5 . 3 : For loops. Fill in the missing code to perform the desired calculation. 1 ) Compute the average

PARTICIPATION ACTIVITY
5.5.3: For loops.
Fill in the missing code to perform the desired calculation.
1)
Compute the average number of kids.
# Each list item is the number of kids in a family.
num_kids =[1,1,2,2,1,4,3,1]
total =0
for num in num_kids:
total +=
average = total / len(num_kids)
Check
Show answer
2)
Assign num_neg with the number of below-freezing Celsius temperatures in the list.
temperatures =[30,20,2,-5,-15,-8,-1,0,5,35]
num_neg =0
for temp in temperatures:
if temp <0:
Check
Show answer
3)
Print scores in order from highest to lowest. Note: List is pre-sorted from lowest to highest.
scores =[75,77,80,85,90,95,99]
for scr in
:
print(scr, end='')
Check
Show answer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!