Question: How can you write just one python function( def next_passing_score(current_score): ) for this problem? Professor Pythagoras doesn't believe in the conventional way of computing passing

How can you write just one python function( def next_passing_score(current_score): ) for this problem?How can you write just one python function( def next_passing_score(current_score): ) for

Professor Pythagoras doesn't believe in the conventional way of computing passing scores on exams in his courses He assigns grades out of 1000 and only passes students whose scores satisfy certain criteria. There are three ways that a student can pass an exam: Property #1 : have a score whose digits sum to a multiple of 5 Property #2: have a score that contain a 7 in the tens place and an odd digit in the ones place Property #3: have the score 1000 Write a function next-passing-score () that takes one argument: current-score: an integer that represents a student's score on a math exam. This integer is guaranteed to be within the range 1-999, inclusive. The function returns the next highest passing grade according to the rules given above. If the given score satisfies one of the three properties, then the function simply returns that score. Otherwise, the function starts iteratin;g over larger scores by testing increasingly higher values until one of the three properties is satisfied. Examples: Function Argument Return Value Explanation 192 1 334 468 998 The next passing score satisfies Property #1. The next passing score satisfies Property #1. The current score satisfies Property #1. The next passing score satisfies Property #2 The next passing score satisfies Property #3 195 334 471 1000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!