Guest User

Untitled

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