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 () print ("COSTOM SHAPE MAKER") col = (raw_input("pick a color (color of shape)")) siz = int(raw_input("random # from 10 - 100 (shape size)")) ansa = (raw_input ("do you want your shape filled? (yes or no)")) rec = (raw_input ("do you want a rectangle (yes or no)")) t.setposition (0, 100) if ansa == ("yes"): t.begin_fill () if rec == ("yes"): for a in range (2): t.color (col) t.forward (siz * 2) t.right (90) t.forward (siz) t.right (90) t.end_fill () else: sid = int(raw_input ("pick a # from 3 - 15. (How many sides the shape has)")) for a in range(sid): t.color (col) t.forward (siz) t.right (360 / sid) t.end_fill ()
shapemaker.py
( around 25 lines python code )
Published By:
popbot1
Published on
2018-07-09T22:11:06Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here