Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need python code help with step 4 writing a code per directions: You have worked on three functions (two really) that take in a single

Need python code help with step 4 writing a code per directions:

image text in transcribed

You have worked on three functions (two really) that take in a single parameter to return an answer. Each of those functions are specific to a category. This function determines which of the three functions to call. - If the category is less than 24 , call and store the returned value of get_negative_answer(answer) passing in answer as the parameter. - If the category is between 24 and 73 (including 73), call and store the returned value of get_no_answer(answer) passing in answer as the parameter. - If the category is greater than or equal to 74 , call and store the returned value of get_positive_answer(answer) passing in answer as the parameter. You will then return the answer provided. (there may be different orders you can make the checks in) For a quick refresher on how to call functions within if statements, here is some sample code (not related to this assignment). def a_func_with_if(val1, val2): ans = None if val1 100 : ans = out_of_range(val2) else ans = "In Range!" return ans def out_of_range(val2): return "Not really doing anything with \{\} ".format(val2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions