2025

Python Programming: cycles and functions

Name: Python Programming: cycles and functions
Code: INF16161O
1 ECTS
Duration: 2 weeks/26 hours
Scientific Area: Informatics

Teaching languages: Portuguese
Languages of tutoring support: Portuguese

Sustainable Development Goals

Learning Goals

This Unit aims to deepen students' programming concepts by extending the basic programming notions, particularly within the Python programming language.
By the end of this unit, students should be able to:
1. Understand and apply repetition structures (while and for) with Python.
2. Utilize flow control statements (break and continue) with Python.
3. Design and implement functions to organize code, promote reusability, and improve program readability in Python.
4. Define functions with parameters and arguments.

Contents

? Repetition Structures (Iteration): the while loop; the for loop over sequences.
? Control Flow: the break statement for interrupting loops; the continue statement to advance an iteration.
? Functions and Abstraction: defining functions with def; function body and indentation; calling functions.
? Parameters and Arguments in Functions: defining parameters; passing positional and keyword arguments; assigning default values to parameters (optional arguments).
? Functions with Return Values: the return statement to return values; the None value.
? Code Reuse and Organization: Identifying Repetitive Code.

Teaching Methods

The teaching/learning process is based on a series of asynchronous online sessions, featuring various interactive activities that combine content visualization (short texts, videos, and animations) with simple exercises to gradually assess comprehension as the student progresses through the course program.
There are also synchronous sessions for support and for solving mini-tests.

The use of Project-Based Learning (PBL) methodologies shifts the focus from teaching to the student. The project structures the learning process: it begins with a guiding question, organizes collaborative work in teams, plans research stages, and finally, presents solutions. The teacher acts as a facilitator, offering formative feedback and resources as needed, while students take ownership of their journey, developing critical thinking, creativity, and communication skills.

Assessment

The course evaluation method is continuous assessment, and participants must complete the intermediate mini-test (50%) and the final mini-project (50%).