Added exercise 6
This commit is contained in:
parent
b8ebb1472c
commit
fb538f3bf6
20
ex_06.py
Normal file
20
ex_06.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import turtle
|
||||
|
||||
|
||||
# The sum of the inner angles of a polygon
|
||||
# in an euclidian plane:
|
||||
n = 5
|
||||
inner_angle_sum = (n - 2) * 180
|
||||
|
||||
# Distance between two vertices
|
||||
l = 70
|
||||
|
||||
|
||||
|
||||
for i in range(n):
|
||||
turtle.forward(l)
|
||||
turtle.right(180 - inner_angle_sum / n)
|
||||
|
||||
turtle.mainloop()
|
Loading…
Reference in New Issue
Block a user