Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed 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 you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Administration

Authors: Adam Jorgensen, Bradley Ball

1st Edition

111885926X, 9781118859261

More Books

Students also viewed these Databases questions