Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please Complete the display_result() function that takes two integer parameters: 1. The parameter total, indicating the total number of questions asked during the
in python please
Complete the display_result() function that takes two integer parameters: 1. The parameter total, indicating the total number of questions asked during the quiz. 2. The parameter correct, indicating the number of questions the user has answered correctly. The display_result() function should: Print out how many questions they have answered, and the number they have answered correctly. The percentage of questions they have answered correctly. Note that the answer should be rounded to the nearest 2 decimal places. Also note that this percentage should be set to 0% if the student has not answered any questions (i.e. they have immediately exited the quiz). Some examples of the function being used are shown below. For example: Test Result display_result(5, 4) You answered 5 questions with 4 correct. Your score is 80.0%. Thank you. display_result(0, 0) You answered 0 questions with 0 correct. Your score is 0%. Thank youStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started