At My Fingertips

Create a Battlement

📖 In this activity we introduce the battlement function: it takes two arguments!

⚠️ When a function takes more than one argument, the order in which the arguments are given is important!

  • The first argument should be the color of the battlement

  • The second argument should be one of the merlons imported in line 4: rectangular_merlon, rounded_merlon, or split_merlon.

💡 Hint: change the first argument from grey to pink, and the second argument from rectangular_merlon to split_merlon

Loading...
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!

Does this battlement look familiar? In one of the first activities we provided a premade battlement, called magical_battlement. You are now able to make it yourself!

🚀 You are doing great!


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

Create a Battlement

Logo of PyTamaro

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

Privacy PolicyPlatform Version b744b47 (Tue, 08 Oct 2024 16:30:14 GMT)