Question: create a function rainbow _ or _ age that takes a string argument if argument is a digit return the value of calling age _

create a function rainbow_or_age that takes a string argument
if argument is a digit return the value of calling age_20() with the str value cast as int
if argument is an alphabetical character return the value of calling rainbow_color() with the str
if neither return FALSE
In []: M#
In []: ,[] add 2 numbers from input using a cast to integer and display the answer
In []: # [] Multiply 2 numbers from input using cast and save the answer as part of a string "the answer is..."
# display the string using print
In []: , # [] get input of 2 numbers and display the average: (num1+ num2) divided by 2
In []: # [] get input of 2 numbers and subtract the largest from the smallest (use an if statement to see which is larger)
# show the answer
In []: , # ] Divide a larger number by a smaller number and print the integer part of the result
# don't divide by zero! if a zero is input make the result zero
# [] cast the answer to an integer to cut off the decimals and print the result
 create a function rainbow_or_age that takes a string argument if argument

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