Step 4 – Drawing semi-circles
As well as drawing whole circle, it's also possible to draw a semi-circle in Python.
You'll need this for the next challenge...
The code for this is quite easy:
- Use the code in the screenshot to draw a semi-circle on a flag
The second number in the circle line is 180°. There are 360° in a circle, so 180° is half a circle
- Run your code to see what happens
- Try changing the 180 to 90. What happens?
- Now try changing is to 270. What happens?
- And try a number like 35
This will work for any number between 1 and 359.
Higher numbers work best to show what happens.