cups_to_ounces - print'reference the formula is print 1 cup...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
# This program converts cups to fluid ounces. # def main(): # display the intro screen. intro() # Get the number of cups. cups_needed = input('Enter the number of cups: ') # Convert the cups to ounces. cups_to_ounces(cups_needed) # The intro function displays an introductory screen. def intro(): print 'This program converts measurements' print 'in cups to fluid ounces. For your'
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 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 print 'That converts to', ounces, 'ounces.' # Call the main function. main()...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online