Text Size
Text Size
Exit Full Screen
Python Mini
Show
Source Code
View Source Code in Full Screen
Open in New Tab
from turtle import Turtle t=Turtle() t.speed(10) t.setposition(-150,0) color = raw_input('what color do you want your shape') t.color(color) ans = raw_input('what shape do you want to make- circle, star, rectangle, triangle') if ans == "circle": t.setposition(0,-100) radius = raw_input('what size do you want your shape- number 50-200') radius = int(radius) t.circle(radius) (int(radius)) if ans == "star": radius = raw_input('what size do you want your shape- number 50-200') radius = int(radius) for i in range(5): t.fd(245) t.lt(-144) (int(radius)) if ans == "rectangle": radius = raw_input('what size do you want your shape- number 50-200') radius = int(radius) for i in range(2): t.fd(200) t.lt(90) t.fd(100) t.lt(90) (int(radius)) if ans == "triangle": radius = raw_input('what size do you want your shape- number 50-200') radius = int(radius) for i in range(3): t.fd(200) t.lt(120) (int(radius))
UserInput.py
( around 36 lines python code )
Published By:
Messi10
Published on
2017-06-29T19:31:57Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here