From fb538f3bf65603e0160b352651981b41aa1b1c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kn=C3=BCttel?= Date: Wed, 31 Oct 2018 13:48:30 +0100 Subject: [PATCH] Added exercise 6 --- ex_06.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ex_06.py diff --git a/ex_06.py b/ex_06.py new file mode 100644 index 0000000..27c1b6d --- /dev/null +++ b/ex_06.py @@ -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()