daily pastebin goal
18%
SHARE
TWEET

Untitled

a guest Jan 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top