Python exercises: Canvas
Contents
Python exercises: Canvas¶
Exercise 1. Reproduce the pokeball¶
Reproduce the pokeball as explained during the video in today’s lessons.
# your code here
Exercise 2. Create a animated countdown timer¶
Adapt he pokeball in such a way that you create an animated countdown timer that counts from 30 to 0 seconds and shows a red arc that become smaller with time.
Hint The easiest solution is to present a loop that runs 30 times, updates the arc and text and then waits 1 second (let’s ignore for now that the canvas operations also take time so the timer might be slightly inaccurate)
# your code here
Exercise 3. Advanced countdown timer¶
Ask the user how many seconds they want to wait and run the timer with this value. Check whether the value is not higher than fits in the display (99m:59s).
# your code here