GoConqr has a new look! Let us know what you think.

Module 18 of 23 · Text

How to write and run your very first program 1

David Khieu

How to write and run your very first program 1

It is now time to write and run your first Python 3 program. It will be very simple, for now. 

The first step is to create a new source file and fill it with coe. Click File in the IDLE menu and choose New File

As you can see, IDLE opens a new window for you. You can use it to write and amend your code. 

This is the editor window. It's only purpose is to be a workplace in which your source code is treated. Do not confuse the editor window with the shell window. They perform different functions. 

The editor window is currently untitled, but it's good practice to start work by naming the source file. 

Click File (in the new window), then click Save as..., select a folder for the enw file (the desktop is a good place for your first programming attempts) and chose a name for the new file. 

Note: don't set any extension for the file name you are going to use. Python needs its files to have the .py extension, so you should rely on the dialog window's defaults. Using the standard .py extension enables the OS to properly open these files. 

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?