repl.it
@cjkevin0912/

python-basic-hw10_2

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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import turtle

input_sides = int(input('please keyin how many sides you want?'))
input_pencolor = input(' Please input pencolor')
input_fillcolor = input(' Please input fillncolor')

angle = 360.0 / input_sides
length = 400.0 / input_sides

for input_side in range(input_sides):
    turtle.forward(length)
    turtle.right(angle)

turtle.done()





   
  










  



result
console
?