After installing Python and PyCharm, we explain here how you can write and run your first Python program. You can either read through the instructions below or watch this instruction video.

Note

The most recent Python version is 3.13; the most recent PyCharm is 2025.2. Older versions of Python and PyCharm are used in the instructional video, which may result in minor differences.

We also do not use the Dodona plugin for PyCharm in the video. This plugin makes it possible to submit your solutions directly from PyCharm.

Create a new Python project

In PyCharm you can create multiple software projects that you can work on simultaneously. For our purposes we will make a single PyCharm project that will contain the solutions for all programming assignments you will work on in the Programming course. This way, you also get an overview of all the work you have delivered so far.

The next few paragraphs describe how you can create a new project in PyCharm, and how you create and organize your Python files in this project. This is done by taking the following steps:

Create a new directories and a new file

In a PyCharm project you can create multiple files and directories. Files can either contain Python source code or other information. We will start with a file that initially has an empty content. The following procedure illustrates how to create a new folder and a new file in the Python project that we just created.

Write and execute code

Submit your solution to Dodona

If you think you have a correct solution, you can submit it to Dodona. At the top right of the PyCharm window you should see a blue checkmark button.

Press the blue button to submit your solution.

This button will upload your code to Dodona, where it is tested thoroughly. After a few seconds you will see a notification at the bottom right of your screen that displays the test results.

Notification for a correct solution

Click View results to open detailed test results (and the submitted code) in a new browser window.

Results

You can submit as many solutions as you want until you have delivered a correct solution that also excels in terms of programming style.