Question: Steps for Do not use any functions or statements that have not been covered in class! TASKS ( 5 pts ) Write a function called
Steps for
Do not use any functions or statements that have not been covered in class!
TASKS
pts Write a function called abval that returns the absolute value of a number. Do not
use the builtin absolute value function from the math library.
Signature:
def ab valx:
#your code
return
pts Write a function called circcalc that returns the specified measure of a shape
from two parameters: the radius and the measure sought. Round your answers to the nearest
thousandth. Use
c circumference
a area using
volume of a sphere
If the measure parameter is not any of these, return
Signature:
def circcalcradius shape:
#your code
return :
pts Write a function called stockadvice that determines what to do with a particular
stock from its purchase price and its current price. The first parameter is the purchase price and
the second is the current price.
The advice is "BUY" when the stock is up more than
The advice is "SELL" when the stock is down more than
For a stock that isn't changing very much up more than or down less than the
response should be "HOLD".
Signature:
def stockadvice startprice, endprice:
#your, code
return
Do not use any functions or statements that have not been covered in class!
TASKS
pts Write a function called abval that returns the absolute value of a number. Do not
use the builtin absolute value function from the math library.
Signature:
def abval x :
#your code
return
pts Write a function called circcalc that returns the specified measure of a shape
from two parameters: the radius and the measure sought. Round your answers to the nearest
thousandth. Use
c circumference
a area using
volume of a sphere
If the measure parameter is not any of these, return
Signature:
def circcalcradius shape:
#your code
return
pts Write a function called stockadvice that determines what to do with a particular
stock from its purchase price and its current price. The first parameter is the purchase price and
the second is the current price.
The advice is "BUY" when the stock is up more than
The advice is "SELL" when the stock is down more than
For a stock that isn't changing very much up more than or down less than the
response should be "HOLD".
Signature:
def stockadvice startprice, endprice:
#your code
return
A player needs to have more than a hundred times the next level's number in order to
levelup
Signature:
def leveluppoints level:
#your code
return :
pts Write a function called minutespassed that determines the number of minutes
between a start time and an end time. The function takes four parameters representing the
hour and minutes for the start time and the hour and minutes of the end time.
Signature:
def minutespassedhmhm:
#your code
#return
assed
assed
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
