Advertisement
aneliabogeva

08. Ski Trip

Apr 23rd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. days = int(input())
  2. type = input()
  3. estimation = input()
  4. price = 0
  5.  
  6. if days < 10:
  7. if type == 'room for one person':
  8. price = (days-1) * 18
  9. elif type =='apartment':
  10. price = (days - 1) * 25
  11. price = price - (price*0.25)
  12. elif type == 'president apartment':
  13. price = (days - 1) * 35
  14. price = price - (price * 0.10)
  15. elif days >= 10 and days < 15:
  16. if type == 'room for one person':
  17. price = (days-1) * 18
  18. elif type =='apartment':
  19. price = (days - 1) * 25
  20. price = price - (price*0.35)
  21. elif type == 'president apartment':
  22. price = (days - 1) * 35
  23. price = price - (price * 0.15)
  24.  
  25. elif days >= 15:
  26. if type == 'room for one person':
  27. price = (days-1) * 18
  28. elif type =='apartment':
  29. price = (days - 1) * 25
  30. price = price - (price*0.50)
  31. elif type == 'president apartment':
  32. price = (days - 1) * 35
  33. price = price - (price * 0.20)
  34.  
  35. if estimation == 'positive':
  36. price = price + (price*0.25)
  37. else:
  38. price = price - (price*0.10)
  39.  
  40. print(f'{price:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement