@mdjb4/

Choice

Python (with Turtle)

No description

fork
loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import turtle
import time 
leo=turtle.Turtle()

print ("Welcome to Matthew's turtle program!")
LineSize=int(input("How thick would you like the lines to be?"))
if LineSize>12 :
  print ("Invalid thickness")
  exit()

Linecolor=(input("What colour?"))
ShapeSides=int(input("And finally how many sides would you like the shape to have?"))
if ShapeSides>12 :
  print ("invalid length")
  exit()

leo.pensize (LineSize)
leo.pencolor(Linecolor)

for leoMoves in range (ShapeSides) :
  leo.forward (100)
  leo.left (360/ShapeSides)
result
console