Create functions for the following: Function descriptions:Function #1: superman Parameters: height - an integer representing the user's height in inches Description: Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'. Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.' Test Cases: >>>superman(30) Sorry. You must be at least 4 feet 8 inches to ride. >>>superman(70) Have a great ride! Function #2: largest Parameters:num1 - a floating-point number num2 - an even number num3 - an odd number Description: Write a function that takes in three numbers as parameters and prints out the largest of the three. Then. test for an even number and an odd number and print each respectively. Please use comments and your answers have to tell me what is being printed out.
Create functions for the following:
Function descriptions:
Function #1: superman Parameters: height - an integer representing the user's height in inches Description: Write a function for the Superman ride at Six Flags that determines whether the user is taller than 4'8" so that he or she can ride a roller coaster. If the user's height, which is provided by the parameter height, is greater than or equal to the minimum height, print the string 'Have a great ride!'. Otherwise, print the string 'Sorry. You must be at least 4 feet 8 inches to ride.'
Test Cases: >>>superman(30)
Sorry. You must be at least 4 feet 8 inches to ride.
>>>superman(70)
Have a great ride!
Function #2: largest
Parameters:
num1 - a floating-point number
num2 - an even number
num3 - an odd number
Description: Write a function that takes in three numbers as parameters and prints out the largest of the three. Then. test for an even number and an odd number and print each respectively.
Please use comments and your answers have to tell me what is being printed out.
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images