At My Fingertips
Rapid Playground
Let's compose an egg using Moss's egg construction:
Drawing by Kmhkmh, CC BY 4.0, via Wikimedia Commons
Let's construct an egg (colored in the given SHELL_COLOR
).
Use circular_sector and triangle.
Implement the sliced_egg
function to compose a sliced egg showing the egg white and egg yolk.
Either use and modify the code of the above egg
function, so that it constructs two half-yolks (one for the top part, and one for the bottom part of the egg),
or call the egg
function to build the egg white, and then superimpose the circular yellowish egg yolk, padded by an appropriate amoung (e.g., placing them above a rectangle with the appropriate height).
Now that you have a function to compose an egg, you may want to compose a nest full of colorful Easter eggs.
This activity has been created by LuCE Research Lab and is licensed under CC BY-SA 4.0.
Egg
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version c08406b (Wed, 20 Nov 2024 12:30:00 GMT)