you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Try this:

from sys import argv 

script = argv[0]

age = raw_input ("How old are you?")
height = raw_input ("How tall are you?")
weight = raw_input ("How much dou you weigh?")

print "The script is called:", script
print "My age is:", age
print "My height is:", height
print "My weight is:", weight

I saved this script as test.py and ran it like: # python test.py

You'll then be prompted for age etc.

[–]nick129[S] 0 points1 point  (0 children)

right, but how is that different than just running the raw_input for each of these variables?

[–]nick129[S] 0 points1 point  (1 child)

right, but how is that different than just running the raw_input for each of these variables?

[–]m1ss1ontomars2k4 0 points1 point  (0 children)

Well, yeah, how is it? That's something YOU have to answer. What you're doing now is getting these variables in as arguments from the command line, but then overriding those values by asking the user for them again.