Create a Wall

In this activity we introduce the wall function. You will use it to build your castle!

📖 The wall function takes three arguments!

⚠️ These are the arguments needed by the wall function, in order:

  • The first argument should be the color of the wall

  • The second argument indicates whether the wall has borders or not (using either borders or no_borders)

  • The last argument should be one of the wall properties imported in lines 5 and 6: bricks, ivy, crack, door, double_door, window, rounded_window, or nothing.

Loading...

If you look carefully at the code at line 9 and compare it with the graphical output, it makes sense, doesn't it?

Loading...
Are you stuck?If you're stuck, replace the code after the = with wall(pink, borders, ivy)
Code is messed up?Always remember that if you edit the cell and you're stuck you can reset it to the original state by clicking this symbol reset symbol on the top right of the page!

🎉 That's awesome! You will use this wall function to generate pieces to build your castle!


This activity has been created by LuCE Didactics Innovation Team and is licensed under CC BY-SA 4.0.

Create a Wall

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy Policy • Platform Version ede3c94 (Fri, 23 May 2025 14:43:18 GMT)