Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2014
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.19 KB | None | 0 0
  1. ve = str(raw_input("tipo vehiculo: "))
  2. ds = str(raw_input("dia: "))
  3. ho = str(raw_input("horario: "))
  4. pa = int(raw_input("cantidad de pasajeros: "))
  5. HM = int(ho[0] + ho[1] + ho[3] + ho[4])
  6. a = 0
  7. if (ds == "lunes") or (ds == "martes") or (ds == "miercoles") or (ds == "jueves") or ( ds == "viernes"):
  8.     if HM in range (730, 930) or  HM in range(1730, 2000):
  9.         if ve == "camion":
  10.             a = 3500
  11.         elif ve == "auto" and pa >=3:
  12.             a = 0
  13.         elif ve == "auto" and pa <=2:
  14.             a = 2400
  15.     elif HM not in range (730, 930) or  HM not in range(1730, 2000):
  16.         if ve == "camion":
  17.             a = 2500
  18.         elif ve == "auto" and pa >=1:
  19.             a = 2000 - (pa)*100
  20. elif (ds == "sabado") or (ds  == "domingo" ):
  21.     if HM in range (830, 1100) or  HM in range(1745, 2230):
  22.         if ve == "camion":
  23.             a = 4500
  24.         elif ve == "auto":
  25.             a = 4500 - 300*(pa)
  26.     elif HM not in range (830, 1100) or  ho not in range (1745, 2230):
  27.         if ve == "camion":
  28.             a = 3800
  29.         elif ve == "auto":
  30.             a = 2800
  31. print "Total a pagar: ", a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement