Question: In this question, you need to create a function named cond _ test that will send in a single input variable A , and return

In this question, you need to create a function named cond_testthat will send in a single input variable A, and return the calcualtion ofB (the value of which depends upon the value of A) and the variables Topand Bottom(which are the boundaries set for the conditional statements as detailed below). The outputs must be in that order.
The function must:
(i) Set a variable Topto equal 20 and a variable Bottomto equal 10.
(ii) Using the conditional statements if, elseifand else,calcualte the value of Bdepending upon the equations below.
when Ais greater than TOP, Bequals 3.423 times A
when Ais greater than or equal to Bottombut less than or equal to TOP, Bequals 16.42 times A
otherwise Bequals 180.

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 Programming Questions!