Hello World Printing
Hello world program
Learning Objectives
- Bringing some content to standard output
Source Code
|
Run Output
Code Understanding
print(“Hello World”)
print function outputs any parameter passed to standard output device.
Notes
- The hello world string can alternatively be given in single quotes also.
- In version 2.x series of python print is not function style so one can also write
print “Hello World!”
directly. - The function style print() works in all latest implementations of version 2.6/2.7 also.
Common Errors
- Some time students write print in old style (ver 2.x style – without function brackets) and try to interpret it in version 3.x of python then error is bound to come.
CSKC| Created: 9-Nov-2018 | Updated: 12-Feb-2019|