Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve using python #Question 3 def getUserInput(): Return a floating point number obtained with active user input This function asks the user

image text in transcribed

Please solve using python

#Question 3 def getUserInput(): " " "Return a floating point number obtained with active user input This function asks the user to input a number. If the input given is not acceptable the function keeps asking for the input until a valid input (any number) is given. Convert the input number to a floating point number Arguments: none Returns: A floating point number return False def getIntegerComponent (inputNumber): " " "Return the integer component of a number Isolate the integer part of the number Arguments: inputNumber : a floating point numbe:r Returns: An integer >>>getIntegerComponent (3.899) >>>getIntegerComponent (-4.56) return False def printFavoriteNumber (num): "" "Print the input number a random number of times Generate a random integer n (between 1 and 20), and the print the following line: "We will print your favorite number n times using the value of n Then print the following n times "Your favorite number is num" using the value of num Arguments: num : a number Returns nothing >>> printFavoriteNumber (3.5) #the following lines will be printed "We will print your favorite number 2 times" "Your favorite number is 3.5" "Your favorite number is 3.5 return False def getAndPrintFavNum(): "" "Print the user's favorite number a random number of times Call the function getUserInput to get a number, then use that numbeir as the input parameter to call the function getIntegerComponent to get an integer, and thein use that integer as the input parameter when calling the function printFavoriteNumber Arguments: none Returns: nothing return False

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

Step: 3

blur-text-image

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

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago