# Lecture 1 demo # Bei Xiao # collaborater: xyz # raw_input_example.py # 9.3.2014 name = raw_input("What is your name? ") city = raw_input("What city do you live in? ") state = raw_input("What state is that in? ") print "Hello there! it is so great to meet you," #One way to do this is to print strings on separate lines print name print "from" print city print state #We can also "glue together" pieces of a string by adding commas between them. print name, "from", city, state age = raw_input("Pardon my rudeness, but how old are you? ") print age, " Wow! You look like you could be " int(age - (0.15(age)))
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