
Week 1: Preparation#
Reading Material#
The content of Week 1 roughly corresponds to Think Python (TP), Chapter 1 Programming as a way of thinking. The small differences between the book and the course are in the order of introducing concepts: We postpone a formal definition of types to next week, but we use print statements and comments already this week (the book introduces print statements and comments in Chapter 2).
Installing Python#
To follow this course, you need to have Python installed on your computer. Python is also used in other courses in the polytechnical foundation, such as Mathematics and Physics. To help you with the Python installation, DTU has a dedicated Python Support. They have prepared an installation guide which you should follow to install all the necessary packages and tools required for the first-year courses at DTU.
Task. Install Python by following the instructions on the Python Support website. If you have problems, contact Python Support.
Executing Python#
To learn to write Python code, you need to know how to run (execute) it. There are different ways to do this depending on your computer and operating system. For now, it is enough to find one method that works for you. Later, when you have more experience, you can compare the different methods and choose the one you prefer.
We describe different ways to run Python on the Executing Python page under Additional content. As a beginner, you do not need to understand all of it now, but you may skim the page. Once you have some experience with Python, we will ask you to come back to it.
