print "I will now count my chickens:" #sum of chickens print "Hens", 25.0 + 30.0 / 6.0 #sum of roosters print "Roosters", 100.0 - 25.0 * 3.0 % 4.0 #string output print "Now I will count these eggs:" #sum of eggs print 3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 + 6.0 #string output print "Is it true that 3 + 2 < 5 - 7?" #T or F output print 3.0 + 2.0 < 5.0 - 7.0 #sum output print "What is 3 + 2?", 3.0 + 2.0 #sum output print "What is 5 - 7?", 5.0 - 7.0 #string output print "Oh, that's why it's False." #string output print "How about some more." #T or F outputs print "Is it greater?", 5.0 > -2.0 print "Is it greater or equal?", 5.0 >= -2.0 print "Is it less or equal?", 5.0 <= -2.0
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