MyName = 'Zed A. Shaw' #Not really but that is the exercise so... MyAge = 35 #Basically from here on out none of this is my real info. MyHeight = 74 MyWeight = 180 MyEyes = 'Blue' MyTeeth = 'White' MyHair = 'Brown' MetricHeight = MyHeight * 2.54 MetricWeight = MyWeight * .4536 print "Let's talk about %s." % MyName print "He's %d inches tall." % MyHeight print "This is", str(MetricHeight), "Cms." print "He's %d pounds heavy." % MyWeight print "This is", str(MetricWeight), "in Kgs." print "Actually that's not too heavy." print "He's got %s eyes and %s hair." % (MyEyes, MyHair) print "His teeth are usually %s depending on the coffee." % MyTeeth # Apparently this next line is tricky so here it goes. print "If I add %d, %d and %d I get %d." % (MyAge, MyHeight, MyWeight, MyAge + MyHeight + MyWeight)
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