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

 Please solve using python #Question 3 def getUserInput(): " " "Return

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

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!