Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def museumAdmissionFee(adults, seniors, children):
- total = 6
- n = 1.0
- while n<children:
- n+=1
- total+=6*.9**(n-1)
- if children<=0:
- total=0
- return float(total + adults + seniors)
- c=float(input ('How many children?: '))
- a=float(input ('How many adults?: '))*10
- s=float(input ('How many seniors?: '))*7
- print ('Price for entrance',museumAdmissionFee(a, s, c),'$')
- input()
Add Comment
Please, Sign In to add comment