Course Answers

BUSINESS
COMPUTER SCIENCE
OTHER COURSES
My Profile

Solved: Python 3.7 To Be Used And No Needs For Imports. Just A Simple Design A Program That Depends On Its Own. Thanks

By |

Python 3.7 to be used and no needs for imports. Just a simple design a program that depends on its own. Thanks

Grace Hoppers Museum Your boss, Ms. Grace Hopper, has come to you with a problem. She would like a program which will allowAnswer to coupon will be ys or ns (type character) Specific requirements: You must accept both upper and lower case answers



Grace Hopper's Museum Your boss, Ms. Grace Hopper, has come to you with a problem. She would like a program which will allow patrons of her computer muscum (what clsc -) to determinc thcir entrancc fees beforc stepping up to thc tickct window. Rcgular admission priccs arc as follows AGE PRICE 4 ar u1der $5.03 5 L 64 $9.03 65 ard Over $7.30 In addiion Hopper's museum offers a 1-dollar-ofT coupon that the patron may have. This program will first query the patron for his/her date of birth, and then ask for the current date. Ihen the program will ask if s/hehas a discount coupon. Based on this information, the prograin will then calculate the patron's adnission price and display it for the user. (Note that this means your program will calculate the user's age!!) Here is a sample run: Hello, welcome to Hopper's Computer Museum! To determine your entrance fee, please enter the following Your Date of Birth (mm dd yyyy)--> 10 10 2002 Today's date (mm dd yyyy) --> 10 9 2017 Do you have a coupon (y/n) ?--> y Your admission fee is $4.00, enjoy your visit! Assumptions Values for dates will be entered on one line and the user will not enter a birth date that is after the current date ament Answer to coupon will be y's or n's (type character) Specific requirements: You must accept both upper and lower case answers for the coupon question Your user interface must look EXACTLY as shown above (NOTE: the numbers shown in the examplc are sample inputs from 'running' the program - don't wory about formatting the input from thc uscr) Sereen user input so that a valid month and day is entered. To determine if a day is valid you must first have the month (since different months have diflerent numbers of days assue February has 28). Ifan improper value is entered, display that shows what value they entered and the range of valuesthat are acceplable, then exit the program. a message Turn in: Assignmen

Answer Preview

Solution: # To check if the date is valid def isvalid(date): mdy = date.split() month = int(mdy[0]) day = int(mdy[1]) if month == 2: if not day >= 1 and day <= 28: return False else: return

Get Answer Now


Buy (USD $9.00)

Get Answer Now

Answered
Buy @ USD $9.00
Related Questions

OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES
OTHER COURSES