Text Size
Text Size
Exit Full Screen
Python Mini
Show
Source Code
View Source Code in Full Screen
Open in New Tab
import turtle as tor def torCurve(lr, times, deg, fr): if lr == "left": for cl in range(times): tor.left(deg) tor.forward(fr) elif lr == "right": for cr in range(times): tor.right(deg) tor.forward(fr) tor.speed(10) tor.setposition(25, 95) tor.begin_fill() tor.color(95, 80, 75) tor.setposition(25, 95) tor.left(20) tor.forward(100) for leftwing in range(5): torCurve("right", 180, 1, 0.1) tor.forward(10) tor.right(180) tor.right(180) tor.forward(50) tor.right(90) tor.forward(70) tor.right(110) tor.end_fill() tor.begin_fill() tor.color(110, 90, 85) tor.setposition(0, 0) torCurve("left", 180, 1, 1) tor.forward(72) for t2 in range(2): torCurve("left", 52, 1.2, 0.6) tor.forward(72) torCurve("left", 53, 1.2, 0.6) tor.forward(52) tor.end_fill() tor.setposition(25, 95) tor.begin_fill() tor.color(255, 125, 175) tor.left(100) tor.forward(60) torCurve("right", 190, 1, 0.23) tor.forward(60) torCurve("right", 170, 1, 0.14) tor.end_fill() tor.begin_fill() tor.setposition(25, 158) tor.color(255, 255, 255) tor.circle(8) tor.end_fill() tor.begin_fill() tor.color(0,0,0) tor.circle(2) tor.end_fill() for beak in range(2): tor.begin_fill() tor.color(235, 177, 33) tor.penup() tor.right(120) tor.forward(5) tor.pendown() tor.forward(20) tor.right(150) tor.forward(20) tor.right(90) tor.forward(10) tor.end_fill() torCurve("right", 6, 3, -1) tor.begin_fill() tor.color(255, 110, 125) tor.left(45) torCurve("right", 5, 10, 4) torCurve("right", 90, 2, 0.1) torCurve("left", 5, 8, 4) tor.forward(20) torCurve("right", 98, 2, 0.2) tor.forward(23) tor.end_fill() tor.setposition(-80, 50) tor.left(110) tor.color(95, 80, 75) for tailfins in range(4): tor.begin_fill() tor.forward(55) torCurve("right", 65, 3, 1) tor.forward(55) tor.right(85) tor.forward(25) tor.end_fill() tor.right(80) tor.forward(40) tor.color(190, 160, 150) tor.begin_fill() tor.forward(15) tor.right(95) tor.forward(40) tor.right(101) tor.forward(15) tor.right(80) tor.forward(38) tor.end_fill() tor.penup() tor.left(90) tor.forward(40) tor.left(85) tor.forward(35) tor.left(80) tor.pendown() tor.color(95, 80, 75) tor.color(90, 70, 70) tor.left(40) tor.begin_fill() torCurve("right", 35, 2, -1) tor.right(80) torCurve("left", 50, 2, -2) tor.left(30) torCurve("right", 135, 1, 1) tor.end_fill() tor.setposition(0, 0) tor.color(235, 177, 33) tor.right(20) for feet in range(2): tor.forward(50) tor.left(35) tor.begin_fill() for foot in range(3): torCurve("right", 35, 2, 1) torCurve("left", 30, 2.5, -1) tor.right(35) tor.backward(10) tor.end_fill() tor.begin_fill() tor.forward(6) tor.right(127) tor.forward(38) torCurve("right", 180, 1, 0.05) tor.end_fill() tor.penup() tor.backward(35) tor.pendown() tor.right(120) tor.begin_fill() tor.color(95, 80, 75) tor.right(40) torCurve("left", 40, 1.5, 1) torCurve("left", 10, 4, 0.3) tor.forward(60) for rightwing in range(5): torCurve("left", 180, 1, 0.1) tor.forward(5) tor.right(180) tor.right(170) torCurve("left", 12, 1, 4) torCurve("left", 90, 1, 0.1) tor.end_fill() tor.setposition(10, 168) tor.color(255, 100, 160) tor.width(5) tor.right(120) tor.forward(20) tor.setposition(80, 100) tor.width(1) tor.begin_fill() tor.color(174, 138, 98) for sword in range(20): for wood in range(4): tor.forward(10) tor.left(90) tor.left(90) tor.forward(10) tor.right(90) tor.end_fill() tor.begin_fill() tor.color(158, 0, 60) tor.right(170) for flag in range(3): torCurve("left", 10, 8, 3) torCurve("right", 10, 9, 3) for flag2 in range(2): torCurve("left", 10, 6, -4) torCurve("right", 10, 7, -3) tor.right(50) tor.forward(90) tor.end_fill() tor.setposition(-200, -150) tor.right(60) #for frame in range(15): #for square in range(4): #tor.forward(250)
ch_ThxGiving_art.py
( around 191 lines python code )
Published By:
EM5700
Published on
2019-11-27T13:33:20Z
Python Mini
- an
OYOclass
application,
own your own class today
.
Run
Result
×
Error message shows here