I've started programming today and have this issue with Python. It's pretty dumb but I can't figure out how to do it. When I use the print command, it prints whatever I want and then goes to a different line. For example:
print "this should be"; print "on the same line"
this should be on the same line
but instead returns:
this should be
on the same line
More precisely I was trying to create a program with if that told me whether a number was a 2 or not
if x == 2:
print "Yeah bro, that's tottaly a two"
print "Nope, that is not a two. That is a (x)"
But it doesn't recognize the last (x) as the value entered, and rather prints exactly: "(x)" (the letter with the brackets). To make it work I have to write:
print "Nope, that is not a two. That is a"; print (x)
And if e.g. I enter test2(3) that gives:
Nope, that is not a two, that is a
So either i need to make Python recognize my (x) inside a print line as the number, or to print two separate things but on the same line. Thanks in advance and sorry for such a stupid question.
IMPORTANT NOTE: I am using version 2.5.4
Another note: If i put print "Thing" , print "Thing2" it says "Syntax error" on the 2nd print.