Question: Define a function called get_scores() that takes a positive integer as an argument and asks the user that many times to enter in a numerical
Define a function called get_scores() that takes a positive integer as an argument and asks the user that many times to enter in a numerical score or a comment. After gathering all the inputs, the function should display the average numerical score and print out each of the Non-numerical comments on its own line. Non-numerical comments should not be included in the average calculation. Note that your function must be able to handle non-integer scores. Try to match the sample output given below as closely as possible. >>> get_scores(5) Please enter the score for round #1: 15 Please enter the score for round #2 : no points scored Please enter the score for round #3 : 100 Please enter the score for round #4 : 11.5 Please enter the score for round #5 : Score invalidated due to wildlife interference. Here are your comments: "no points scored" "Score invalidated due to wildlife interference." The average score was: 42.166666666666664
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
