Question: How do I solve this mathematical problem? Console output will be displayed here 1 my_current_average = 87.1 2 survey_completers = 5e 3 class_size = 100
How do I solve this mathematical problem?


Console output will be displayed here 1 my_current_average = 87.1 2 survey_completers = 5e 3 class_size = 100 4 5 #You may modify the lines of code above, but don't move them! 6 #When you Submit your code, we'll change these lines to 7 #assign different values to the variables. 8 9 #Unlike David Joyner (who believes such bonuses are unethical), 10 #Prof. Shmavid Shmoyner offers a bonus to students' final 11 #average based on the percentage of students that complete the 12 #end-of-course survey. 13# 14 #Prof. Shmoyner's formula is simple: every person that does 15 #the end-of-course survey adds one point to the "pool" of 16 #points. These points are then divided evenly among all 17 #students in the class. 18 # 19 #For example, if 50 students do the end-of-course survey, 20 then 50 points are divided among the class. If there were 21 #160 students in the class, then each student gets 8.5 bonus 22 #points. If there were so students in the class, then every 23 #student would get 1 bonus point. 24 25 #The variables above describe a particular class. Your 26 #average is given by my_current_average. survey completers 27 #shows how many students completed the survey. Class_size 28 #holds how many students are in the class. 29 # 30 write some code that will print the following message with 31 #the appropriate values: 32 33 #After the 0.5 point bonus, my average is 87.6. 34 35 #You should round the bonus to the nearest tenth of a point. 36 #To do this, you can use Python's built-in round function. 37 #To use it, use the following syntax 38 39 #rounded_num= round (original_num, 1) 41 The syntax on the line above will round original num to 1 Console output will be displayed here 16 #points. These points are then divided evenly among all 17 #students in the class. 18 # 19 #For example, if 50 students do the end-of-course survey, 20 #then 50 points are divided among the class. If there were 21 #100 students in the class, then each student gets 0.5 bonus 22 #points. If there were 50 students in the class, then every 23 #student would get 1 bonus point. 24 # 25 #The variables above describe a particular class. Your 26 #average is given by my_current_average. survey_completers 27 #shows how many students completed the survey. class_size 28 #holds how many students are in the class. 30 #write some code that will print the following message with 31 #the appropriate values: 32 # 33 #After the 0.5 point bonus, my average is 87.6. 35 You should round the bonus to the nearest tenth of a point. 36 #To do this, you can use Python's built-in round() function. 37 #To use it, use the following syntax: 38 39 #rounded_num= round (original_num, 1) 41 #The syntax on the line above will round original num to 1 42 #decimal point and assign the result to rounded_num. 44 #Hint: You might need to round both the bonus and the final 45 #grade separately Python does some odd things with adding 46 #decimals sometimes, such as thinking 80.1 + 0.1 is 47 #80.1999999999999 481 50 Add your code here! 51 | 53 54
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
