At My Fingertips
Rapid Playground
Implement the eyes
function to recreate the following graphic.
Since the graphic is mainly composed by circles, to avoid putting the same width and height in the ellipse function each time, let's create a circle
function that only takes a diameter
and a color
.
Since we are going to need two eyes, let's implement an eye
function to avoid having to write the same code twice. The pupil's diameter should be half of the eye's diameter.
You can now implement the eyes
function that returns two eyes beside eachother.
This activity has been created by LuCE Research Lab and is licensed under CC BY-SA 4.0.
Eyes
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)