Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q3 - Debugging & Code Style (2.5 points) In the cell below, there is a function that is not operating as anticipated and that has

image text in transcribed

Q3 - Debugging \& Code Style (2.5 points) In the cell below, there is a function that is not operating as anticipated and that has poor code style. determine_letter_grade ( ) is supposed to take a student's points received ( student_points ) on an assignment as well as the possible points the student could have earned ( possible_points) and return the letter grade the student earned...but it's not quite functioning as anticipated. More specifically, this function should: - calculate the percentage of the possible points the student earned on the assignment (Note: you're only expected to account for percentages between 0 and 100 inclusive...so you don't have to consider 101%, for example.) - use the dictionary ( letter_grades ) provided in the function below to determine what letter grade (the key in the dictionary) the student has earned. Note that the values in the dictionary are the range of possible percentages corresponding to the letter grade. The lower bound should be included in the range while the upper value for each element in the dictionary should not be included in the range for that letter value (i.e. 90% would be an 'A'; 80% would be a 'B', etc.) - return the letter grade earned from the function - and if the user does not provide a value for possible_points, it should default to 100. For example: - determine_letter_grade(student_points =10, possible_points =10 ) would return 'A' - determine_letter_grade(student_points =89, possible_points =100 ) would return 'B' - determine_letter_grade(student_points =5, possible_points =10 ) would return 'F' Debug, edit, and test the function provided below so that it accomplishes the intended goal

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions