desislava_topuzakova

Untitled

Jul 20th, 2021
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. Excursion = float(input())
  2. puzel = float(input())
  3. doll = float(input())
  4. bear = float(input())
  5. minon = float(input())
  6. truck = float(input())
  7.  
  8.  
  9. puzel_p = 2.6
  10. doll_p = 3
  11. bear_p = 4.1
  12. minon_p = 8.2
  13. truck_p = 2
  14.  
  15. discount = 25
  16. sum5 = (puzel + doll + bear + minon + truck)
  17. total1 = ((puzel*puzel_p) + (doll*doll_p) + (bear_p * bear) + (minon*minon_p) + (truck*truck_p))
  18.  
  19. if sum5 >= 50:
  20. total1 = total1-((discount/100)*total1)
  21. pecalba = total1 - ((10 / 100) * total1)
  22. ex1 = pecalba - Excursion
  23. if ex1 >= 0:
  24. print(f'Yes! {ex1:.2f} lv left.')
  25. else:
  26. ex2 = Excursion - pecalba
  27. print(f'Not enough money! {ex2:.2f} lv needed.')
  28. if sum5 < 50:
  29. pechalba2 = total1 - ((10 / 100) * total1)
  30. ex = pechalba2 - Excursion
  31. if ex >= 0:
  32. print(f'Yes! {ex:.2f} lv left.')
  33. else:
  34. ex3 = Excursion - pechalba2
  35. print(f'Not enough money! {ex3:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment