(Solved) : Restrictions Import Modules Math Check Always Allowed Define Helper Wrapper Functions Long Q44083715 . . .
Question 3 : must be done using Python 3

• Restrictions: – Do not import any modules other than math and check. – You are always allowed to define your own helper wrapper functions, as long as they meet the assignment restrictions. Do not use Python constructs from later modules (e.g. dictionaries, loops (for or while or others), zip, sorted, anything with sets or enumerators, slicing, indexing (square brackets), string methods and/or lists). Use only the functions and methods as follows: * abs, len, max and min * Any method or constant in the math module * Any basic arithmetic operation (including +, -, *,/, /1, %, **) * Any basic logical operators (not, and, or) * Typecasting including int(), str(), float(), bool() * if statements * Recursion – While you may use global constants in your solutions, do not use global variables for anything other than testing. 3 Jeopardy! In the classic game show Jeopardy!, three contestants compete to answer trivia questions and earn money by doing so. The person at the end of the game with the most money gets to keep what they have earned. At the last portion of the show, contestants must make a secret bet of their winnings thus far before seeing the final question. If they get the question right, they add their bet to their total. If they get it wrong, they lose that amount of money from their total. A common strategy for the person in the lead is to bet exactly enough money such that if they get the question right and the second place person were to bet everything and also get the question correct, the first player would be victorious. An example should help. Suppose our three contestants had 5000, 7500 and 10000 dollars respectively. If the second place person, who has 7500, were to bet all of their 7500 and get the final question correct, they would have a total of 15000. Thus, the first place player would want to bet 5001 so that if both the first place player and the second place player were to get the final question correct, the first place player would win. Given the three contestants scores, write a function final_jeopardy (c1, c2, с3) which consumes the three natural number scores and returns the amount that the leader should bet in order to guarantee victory if they get the question correct. If two people are tied for first, they should bet everything. If a person is too far ahead to be caught, assume they will bet 0. Sample: final_jeopardy (5000, 7500, 10000) => 5001 final_jeopardy (15000, 15000, 800) => 15000 Show transcribed image text • Restrictions: – Do not import any modules other than math and check. – You are always allowed to define your own helper wrapper functions, as long as they meet the assignment restrictions. Do not use Python constructs from later modules (e.g. dictionaries, loops (for or while or others), zip, sorted, anything with sets or enumerators, slicing, indexing (square brackets), string methods and/or lists). Use only the functions and methods as follows: * abs, len, max and min * Any method or constant in the math module * Any basic arithmetic operation (including +, -, *,/, /1, %, **) * Any basic logical operators (not, and, or) * Typecasting including int(), str(), float(), bool() * if statements * Recursion – While you may use global constants in your solutions, do not use global variables for anything other than testing. 3 Jeopardy! In the classic game show Jeopardy!, three contestants compete to answer trivia questions and earn money by doing so. The person at the end of the game with the most money gets to keep what they have earned. At the last portion of the show, contestants must make a secret bet of their winnings thus far before seeing the final question. If they get the question right, they add their bet to their total. If they get it wrong, they lose that amount of money from their total. A common strategy for the person in the lead is to bet exactly enough money such that if they get the question right and the second place person were to bet everything and also get the question correct, the first player would be victorious. An example should help. Suppose our three contestants had 5000, 7500 and 10000 dollars respectively. If the second place person, who has 7500, were to bet all of their 7500 and get the final question correct, they would have a total of 15000. Thus, the first place player would want to bet 5001 so that if both the first place player and the second place player were to get the final question correct, the first place player would win. Given the three contestants scores, write a function final_jeopardy (c1, c2, с3) which consumes the three natural number scores and returns the amount that the leader should bet in order to guarantee victory if they get the question correct. If two people are tied for first, they should bet everything. If a person is too far ahead to be caught, assume they will bet 0. Sample: final_jeopardy (5000, 7500, 10000) => 5001 final_jeopardy (15000, 15000, 800) => 15000
Expert Answer
Answer to • Restrictions: – Do not import any modules other than math and check. – You are always allowed to define your own hel…
OR