GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 18 von 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. 

 

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck