Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago