gas_per_day = input() food_per_day = input() rent = input() gas = gas_per_day * 30 food = food_per_day * 30 rent_per_day = rent % 30 cost_per_day = rent_per_day + gas_per_day + food_per_day print "the cost per day is" , cost_per_day cost_of_living = rent + gas + food print "the cost per month is" , cost_of_living yearly_cost = cost_of_living * 12 print "the yearly cost is" , yearly_cost """Calculating my cost of living given the value of gas per day, food per day, and rent per month. The first value is cost per day, the second is monthly cost, and the third is yearly cost""" """The First input is Gas, the second input is Food, the third input is Rent"""
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question