2025-plovdiv-ODD/exercises/Exercise 1a Local imports.md
2025-07-20 22:10:03 +02:00

837 B

Exercise 1a: Local importing

Goal

Retrival practice in "basic" importing.

Preparation

(none)

Tasks

We are simulating having code in one folder and calling the code from the folder above.

  1. Create a file in the src/ folder called daily_menu.py and copy the code below into it.
def todays_special():
    pizza_margherita = make_margherita_pizza()

    schorle = make_apfelschorle()

    print("Today's special is ready! Buon Appetito!")
    return pizza_margherita, schorle

pizza, drink = todays_special()
  1. Figure out what import statements are missing, either by visual inspection or by running the code and seeing what does. Add the missing import statements at the top of the file. You may need to inspect the files in src/italianfood/.

  2. Run daily_menu.py. Did it work?