Advertisement
simeonshopov

tourist

Sep 5th, 2019
541
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. town=input()
  2. packet=input()
  3. vip=input()
  4. days=int(input())
  5. towns=("Bansko", "Borovets", "Varna", "Burgas")
  6. packets=("withEquipment", "noEquipment", "withBreakfast", "noBreakfast")
  7.  
  8. if town not in towns or packet not in packets:
  9. print("Invalid input!")
  10. quit()
  11.  
  12. if days<1:
  13. print("Days must be positive number!")
  14. quit()
  15.  
  16. if days>7:
  17. days-=1
  18. else:
  19. days=days
  20.  
  21. if town=="Bansko" or town=="Borovets":
  22. if packet=="withEquipment":
  23. price=days*100
  24. elif packet=="noEquipment":
  25. price=days*80
  26.  
  27. if vip=="yes" and packet=="withEquipment":
  28. price*=0.90
  29. elif vip=="yes" and packet=="noEquipment":
  30. price*=0.95
  31.  
  32. if town=="Varna" or town=="Burgas":
  33. if packet=="withBreakfast":
  34. price=days*130
  35. elif packet=="noBreakfast":
  36. price=days*100
  37.  
  38. if vip=="yes" and packet=="withBreakfast":
  39. price*=0.88
  40. elif vip=="yes" and packet=="noBreakfast":
  41. price*=0.93
  42.  
  43. print(f"The price is {price:.2f}lv! Have a nice time!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement