Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (anonymous):

this question might sound silly, but how in the world we can program in python in rows, not just in one line?Everytime I press Enter i go to the next row with the output shown...

OpenStudy (anonymous):

you mean with the print command? I f you don't' want a newline print a comma after you statement: print "Hello world",

OpenStudy (anonymous):

You are probably typing directly into the interpreter. Assuming you are using IDLE, after you open it, click File, then New Window. This will allow you to type the whole of your code prior to running it. Note that you have to save your code prior to running it and that F5 is the shortcut for running the code through the interpreter.

OpenStudy (anonymous):

I mean python is different,everytime i press enter it shows the outcome(output,answer).İs this anyway to change this feature?

OpenStudy (anonymous):

Ah, in that case,cb12 answers that question perfectly

OpenStudy (anonymous):

ohh...thanks cb12 n duikboot for confirmation, that was really helpful!:)(u made me smile)

OpenStudy (anonymous):

'\n' - new line comand

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!