minte9
LearnRemember / PYTHON





pag. 23-31

Command prompt

 
""" Open command prompt
"""

$ python --version  # Python 3.9.7

$ python
>>> print('Hello World')   # Hello World

Script file

 
""" python hello_world.py
"""

print('Hello World') 

"""
    Hello World
"""

Make mistakes

 
""" Making mistakes on purpose, helps you remember
"""

print 'Hello World'

"""
    SyntaxError: Missing parentheses in call to 'print'. 
"""



  Last update: 17 days ago


Questions and answers:




Output "Hello World" in Python

  • a) print ('Hello World!')
  • b) print "Hello World!"

Check python version:

  • a) whereis python
  • b) python --version


References and applications:






Related pages graph: