Getting input in python


Getting Input from python interpreter using raw_input() function

Here is a piece of code by which you can get the input.

Copy this in your file and execute the file you will be able to get the input

age = raw_input(“How old are you? “)

height = raw_input(“How tall are you? “)

weight = raw_input(“How much do you weigh? “)

 

print “So, you’re %r old, %r tall and %r heavy.” % (

    age, height, weight)

Source from http://learnpythonthehardway.org/book/ex12.html

About pacesettergraam

A good and realistic person

Posted on December 22, 2013, in open source tools and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: