I have an assignment where I let the user input as many scores and then I have to calculate the minimum and maximum value along with how many people got those scores using for-loop. I've calculated the average and the standard deviation:
elif user_option == 3:
total = 0
for val in scores_list:
total = total + val
average = total/ len(scores_list)
print (average)
elif user_option == 2:
total = 0
for val in scores_list:
total = total + val
average = total/ len(scores_list)
diffsquared = 0
sum_diffsquared = 0
for val in scores_list:
diffsquared= (val - average)**2
sum_diffsquared= diffsquared + sum_diffsquared
stdev= sqrt((sum_diffsquared)/len(scores_list))
print(stdev)
Any ideas how to find the min and max values?
ifstatement? Because you can't start withelif...