OK, Ladies and Gents! Either I am missing something simple OR ps0 is providing false results? Here is what I have (I've tried my name, among others, and I get "(x)not defined"): name=input input=name z=name (Jon not defined...works with numbers!) print z (invalid syntax): I purposely left out the test command on this part... output=name output=z z=name print (name): this command provides an input area for data and when enter is pressed, prints it. any ideas?
also, would like to save the ps problems to disk???
input and output are bad variable names. All languages reserve some words for themselves, and input and output are usually among them. The Python v2.x function for prompting a user for input and receiving input is raw_input(). Example: name = raw_input( "Who are you?" ) Note the use of parentheses. Functions have the parameters passed to them in parentheses. This makes what you posted very confusing, your comments look like function arguments.
Join our real-time social learning platform and learn together with your friends!