Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- distance = int(input())
- fuel_consumption = int(input())
- price_fuel = float(input())
- win_money = int(input())
- fuel_consumption1= distance *(fuel_consumption/100)
- cost_fuel = fuel_consumption1 * price_fuel
- need_money = win_money/5
- money = win_money - cost_fuel
- if cost_fuel <= win_money:
- print (f"You can go home. {money:.2f} money left.")
- else:
- print(f"Sorry, you cannot go home. Each will receive {need_money:.2f} money.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement