At My Fingertips
Rapid Playground
Compose a graphic of a sliced watermelon.
In our graphic, the small seeds of the watermelon are distributed in two rings.
They are dark (the color is already defined in SEED_COLOR
)
and have an elliptical shape (about half as wide as long).
Implement the watermelon_seed
function.
Use ellipse.
Compose a sliced watermelon without any seeds.
Use the given colors for the greenish skin (SKIN_COLOR
),
the whiteish pith (PITH_COLOR
),
and the reddish flesh (FLESH_COLOR
).
The watermelon should have the given overall diameter
,
the pith should be 95% and the flesh should be 85% of that diameter.
Create a function ring
that produces a ring of count
seeds, evenly spread across the 360 degrees of a circle.
The inside diameter of the ring should correspond to diameter
(the seeds should form a ring just outside the diameter).
Repetitively call watermelon_seed
to produce the ring of seeds.
Hint: If you need help, check out the Sliced Pitaya activity.
Create two rings of seeds:
Place them on top of a watermelon without seeds.
This activity has been created by LuCE Research Lab and is licensed under CC BY-SA 4.0.
Sliced Watermelon
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)