Python Forum
question about Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: question about Python (/thread-6889.html)



question about Python - nelsonkane - Dec-12-2017

If someone could answer this, that would be great!

My question concerns this video called
"Python Programming Tutorial - 3: Comments in Python:"
https://www.youtube.com/watch?v=Uu7C99-hG60

When I put in print "Hello World!" and hit return, it prints out Hello World! It doesn't give me a chance to put in print "What's up?" and print out both sayings. Instead, it just prints What's up? after I type in print "What's up?"

I can't get in touch with the person who made the YouTube video, someone called "The Bad Tutorials."

Thanks


RE: question about Python - metulburr - Dec-12-2017

IDLE outputs the program output and the Pytohn interpreter indicated by the >>> on the same. He is useing a script and running hte script. I am assuming you are using the >>>

There are multiple ways to execute python and you both are using different methods
read up on this
https://python-forum.io/Thread-Basic-How-to-Execute-python-code


RE: question about Python - mpd - Dec-12-2017

From your description, it sounds you're typing in an interactive terminal. If you put the print statements in a file (e.g., hello.py) and run the file from a command prompt (python.exe hello.py), it will print out both things. (The executable name will depend on what version of python you have installed and what system (Windows, Mac, Linux) you're working with.)


RE: question about Python - Larz60+ - Dec-12-2017

also, when put in a file, be sure not to type the '>>>' as that is just the interactive prompt.