Guest User

Untitled

a guest
Jan 17th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def museumAdmissionFee(adults, seniors, children):
  2. total = 6
  3. n = 1.0
  4. while n<children:
  5. n+=1
  6. total+=6*.9**(n-1)
  7. if children<=0:
  8. total=0
  9.  
  10. return float(total + adults + seniors)
  11.  
  12. c=float(input ('How many children?: '))
  13. a=float(input ('How many adults?: '))*10
  14. s=float(input ('How many seniors?: '))*7
  15.  
  16. print ('Price for entrance',museumAdmissionFee(a, s, c),'$')
  17. input()
Add Comment
Please, Sign In to add comment