Python / Training Session / Hello World
The resources in the following table describe how to create a simple "Hello World" program.
Training Session Summary
Lesson/Task | Description |
---|---|
Prerequisites | As needed... |
Session - Python Setup | Setup Python environment. |
Dev Env - Command Line | Use a command line to run programs. |
Dev Task - Editing Code | Editing Python code. |
Dev Task - Running Python Program | Run a Python program. |
Lesson Sequence | |
See below: Create and Run Program | Create and run simple "Hello World" program. |
Language - Main Program | More information about main program function. |
Create and Run Program
Use a Python code editor to create a file (e.g., hello-world.py
) in workspace files.
The Python code should be similar to the following simple program:
# Hello World program
print("Hello World")
Run the program by opening a command line tool and then running the following using an appropriate Python interpreter for the system:
$> python hello-world.py
Hello World
See Also
- See other lessons listed in the Training Session table above to learn more about using a main program, and exit code, and to understand working directory.