Link Search Menu Expand Document

03 eReader

In this third Python programming assignment, you build an eReader with two functionalities: loading an eBook in the Terminal and enabling the user to ‘turn the page’. This exercise reveals the need for loops to repeat the code. Then, you wrap (or encapsulate) into a reusable function. Finally, you experience the three steps of computational thinking: decomposition, recognition and algorithm design.


Through this assignment, we explore the following concepts:

Function

Encapsulation

While-Loop

For-Loop

String

Object

File

Flow chart

Assertion

💨 Brief Refresher

Let’s start with a brief refresher of the topics we covered in previous assignments that might be useful to remember.

  • Flow Chart – A flow chart is particularly suitable as it represents a sequence of steps and decisions. When thinking or communicating about your algorithm, you might find it easier to start with such a flow chart. We read a flow chart from start to end in oval/rounded shapes. Each shape connects to another via an arrow, and rectangles representd a process (i.e. an action to perform).

  • File – A file is a common way to structure long-term memory. You certainly use files to store pictures and other documents. A file is characterised by a path (where to find it), a type of content (e.g. text, picture, video) and a size.

⏰ Time Management and Expectations

Many Python syntax appear in this assignment with the loops and functions. This is the important part. For this assignment you might need more than 4 hours.

Next: Review


Table of contents