Advertisement
mrScarlett

pre release task 1 2017

Jan 22nd, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. people=int(input("Enter amount of citizens"))
  2.  
  3. if people>9 and people<37:
  4.     if people > 24:
  5.         carers=3
  6.         people+=carers
  7.     else:
  8.         carers=2
  9.         people+=carers
  10.  
  11.     if people>11 and people<17:
  12.         coach=150
  13.         meal=14.00
  14.         ticket=21
  15.     elif people>16 and people<27:
  16.         coach=190
  17.         meal=13.50
  18.         ticket=20
  19.     else:
  20.         coach=225
  21.         meal=13
  22.         ticket=19
  23.  
  24.     totalCost=coach+(people*meal)+(people*ticket)
  25.     citizenCost=totalCost/(people-carers)
  26.     print("Total cost is ", str(totalCost))
  27.     print("Citizen cost for is ", str(citizenCost))
  28.  
  29. else:
  30.     print("Out of range")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement