1 x = ("What is your last name?") 2 y = ("What is your first name?") 3 print x+" "+y f5 Why does this not run?
is that python code? what happens if you run that without the parenthesis
Yes, it is Python Code. If I run without Parenthesis, it says invalid code.
x="hey there!!" y="whats up?!" print x+" "+y well this runs perfectly
Does that mean it is the spaces causing the problem? Let me try it without spaces
spaces are irrelevant. Line numbers it does not like. How can I make the program wait for the answer to the first question before submitting the 2nd question?
you mean you want to print the answer to that question? Like print out your first and last name?
Exactly. I want it to allow me to enter the last name, then enter the first name, then print them out
Aah! okay use raw_input .Its a built in function in python. It takes input from the user . x=raw_input("What's your first name?!!\n") y=raw_input("What's your last name?!\n") print x+" "+y
OK. I was putting them in the wrong order. I had raw_input=x("...
Join our real-time social learning platform and learn together with your friends!