Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- monney_need = float(input())
- months = int(input())
- end_months_monney = 0
- # current_monney = 0
- total_money = 0
- for every_month in range(1,months+1):
- # end_months_monney += monney_need * 0.25
- if every_month == 1:
- end_months_monney += monney_need * 0.25
- continue
- if every_month % 3 == 0:
- # end_months_monney += monney_need * 0.25
- end_months_monney -= end_months_monney * 0.16
- if every_month % 4 == 0:
- # end_months_monney += monney_need * 0.25
- end_months_monney += end_months_monney * 0.25
- end_months_monney += monney_need * 0.25
- total_money = end_months_monney - monney_need
- if total_money >= monney_need:
- print(f"Bravo! You can go to Disneyland and you will have {total_money}lv. for souvenirs.")
- else:
- total_money = total_money * -1
- print(f"Sorry. You need {total_money:.02f}lv. more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement