An Important Message

This exercise will show you the detailed steps you must follow to create your first Python program.

Open up any text editor (Notepad, TextEdit) or IDE (VS Code, PyCharm).

Then, type in the code listed below. Save your file as “important_message.py”. It is important you include the .py file extension.

print("Hello, World!")

It’s important that you resist the urge to copy and paste code when you are learning.

Keep the file open; you will need it again if there are errors.

Open a command prompt. (Win + r, type cmd, click “ok”) Then type, in order, the commands below.

C:\path\to\classwork\folder>python first_prog.py
Hello, World!
C:\path\to\classwork\folder>

You did it! Now try changing the code so that the computer displays a different message.


©2021 Daniel Gallo

This assignment is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.

Creative Commons License

Adapted for Python from Graham Mitchell’s Programming By Doing