#print 'is it less or equal?' ,5 <= -100 #print 4.2 / 1.2 #print 5 < 3 #Alex = 2 #gunnar = 3 #print Alex > gunnar # cars = 100 space_in_a_car = 4.0 drivers = 30 passengers = 90 cars_not_driven = cars - drivers cars_driven = drivers carpool_capacity = cars_driven * space_in_a_car average_passengers_per_car = passengers / cars_driven print 'There are', cars, 'cars available.' print 'there are only', drivers, 'drivers available.' print 'There will be', cars_not_driven, 'empty cars today' print 'We can transport', carpool_capacity, 'people today.' print 'We have', passengers, 'to carpool today.' print 'We need to put about', average_passengers_per_car, 'in each car.' #
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