Question: Modify the program below to demonstrate the following: 1. Prompt the user for the number of ounces 2. Display the equivalent number of cups. #

 Modify the program below to demonstrate the following: 1. Prompt the

Modify the program below to demonstrate the following: 1. Prompt the user for the number of ounces 2. Display the equivalent number of cups. # Activity 2.8 # This program converts cups to fluid ounces. def main( ) : # display the intro screen. intro( ) # Get the number of cups. cups_needed = int(input( 'Enter the number of cups: ') ) # Convert the cups to ounces. ounces_in_main = cups_to_ounces (cups_needed) print ( 'Ounces value sent by the function is', ounces_in_main) # The intro function displays an introductory screen. def intro( ) : print ( 'This program converts measurements') print (' in cups to fluid ounces. For your' ) print('reference the formula is: ') print(' 1 cup = 8 fluid ounces') print ( ) # The cups_to_ounces function accepts a number of # 'cups and displays the equivalent number of ounces. def cups_to_ounces (cups) : ounces = cups * 8 return ounces #print( 'That converts to', ounces, 'ounces. ') # Call the main function. main ( )

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