At My Fingertips

Building a Curtain Wall

In the previous activity you learned how to build towers using lists and above_list. You only need to learn one more thing to be ready to build your castle!

You will now learn how to use the beside_list function, which also takes a list, but composes elements by placing them beside each other.

📖 The first element of the list will go on left of the others, and the last will go on the right.

In the code below, we create three pieces of a defensive curtain wall, composed by a wall with a battlement on top: left_curtain_wall_piece, center_curtain_wall_piece, and right_curtain_wall_piece.

These curtain wall pieces are short towers built using above_list (a battlement on top of a wall).

Loading...

🚀 Well done! You learned that after creating separate towers or curtain wall pieces you can then place them one beside the other using beside_list!

⭐ You are ready to continue, the next activity is the last one!


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

Building a Curtain 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 b744b47 (Tue, 08 Oct 2024 16:30:14 GMT)