adds 2025 materials

This commit is contained in:
Pamela Hathway 2025-07-20 22:10:03 +02:00
commit e85b3b21ca
23 changed files with 378 additions and 0 deletions

View file

@ -0,0 +1,24 @@
## Exercise 1b: Unprotected code
#### Goal
Investigate what happens when importing from modules with "unprotected" code.
#### Preparation
(none)
#### Tasks
0. Create a file in the `src/` folder called `unprotectd_code.py`.
1. Add a line in `unprotectd_code.py` that imports the `todays_special` function from `daily_menu.py`.
2. **BEFORE YOU EXECUTE THE FILE**. Discuss with your partner what you think will happen when you run `unprotectd_code.py`.
3. Run `unprotectd_code.py`. Does your prediction match reality?
4. (optional, for those who know) Discuss with your partner:
* Why did this behaviour occur?
* Why is it not good?
* What can you do to "fix" the behaviour?