Week 1: Preparation

Week 1: Introduction

Week 1: Preparation#

About weekly preparation. In this course, we expect you to come to class prepared. In Week 1, you only need to install Python and read the assigned material. From Week 2, the preparation will also include programming tasks and a weekly quiz. We expect you to complete all tasks from Preparation before each class.

Reading Material#

About reading material. Each week, we list parts of Think Python book and other resources that cover our syllabus. The online version of Think Python by Allen Downey has the same layout as our course material, but is an external resource. You only need to read parts that we list as reading material. You do not need to do the exercises at the end of book chapters, because our exercises are more closely aligned with the course syllabus. You can find an overview of the reading material for the entire course in Reading Material under Additional 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.

image