Python - hello world
How to Run a Hello World Script using Python
This short tutorial is a guide to help familiarize you with writing a simple Hello World program using Python.
This short tutorial is a guide to help familiarize you with writing a simple Hello World program using Python.
1) With Ubuntu running on your virtual machine, open the Terminal window.
1) With Ubuntu running on your virtual machine, open the Terminal window.
2) Create a file using pico by entering the command ‘pico pythontest’
2) Create a file using pico by entering the command ‘pico pythontest’
3) To create a helloworld script simply type the following line:
3) To create a helloworld script simply type the following line:
print “Hello World! \n”;
4) Then save the file by pressing CTRL+O
4) Then save the file by pressing CTRL+O
Leave the file name as is.
Press Enter.
Exit the file window by pressing CTRL+X.
5) Now that your helloworld script is created, run the file by entering the command ‘python pythontest’
5) Now that your helloworld script is created, run the file by entering the command ‘python pythontest’
6) Congratulations, you have successfully created and ran a helloworld script using Python!
6) Congratulations, you have successfully created and ran a helloworld script using Python!
For Additional help you may wish to refer to the link below: