Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Excursion = float(input())
- puzel = float(input())
- doll = float(input())
- bear = float(input())
- minon = float(input())
- truck = float(input())
- puzel_p = 2.6
- doll_p = 3
- bear_p = 4.1
- minon_p = 8.2
- truck_p = 2
- discount = 25
- sum5 = (puzel + doll + bear + minon + truck)
- total1 = ((puzel*puzel_p) + (doll*doll_p) + (bear_p * bear) + (minon*minon_p) + (truck*truck_p))
- if sum5 >= 50:
- total1 = total1-((discount/100)*total1)
- pecalba = total1 - ((10 / 100) * total1)
- ex1 = pecalba - Excursion
- if ex1 >= 0:
- print(f'Yes! {ex1:.2f} lv left.')
- else:
- ex2 = Excursion - pecalba
- print(f'Not enough money! {ex2:.2f} lv needed.')
- if sum5 < 50:
- pechalba2 = total1 - ((10 / 100) * total1)
- ex = pechalba2 - Excursion
- if ex >= 0:
- print(f'Yes! {ex:.2f} lv left.')
- else:
- ex3 = Excursion - pechalba2
- print(f'Not enough money! {ex3:.2f} lv needed.')
Advertisement
Add Comment
Please, Sign In to add comment