Iron Man with Python Using Turtle Module - Beginner's Python Project For Students

Here is the Complete Code For the IRON MAN Using Python | Python's Turtle Module - Beginner's Python Project For Students. ( Download Link of Code Given at the End )

 --- Click on Me to Go to Download Section ---




PYTHON CODE :

import turtle

# Top Part
top=[[(-40120), (-70260), (-130230), (-170200), (-170100), (-16040), (-17010), (-150, -10), (-14010), (-40, -20), (0, -20)],[(0, -20), (40, -20), (14010), (150, -10), (17010), (16040), (170100), (170200), (130230), (70260), (40120), (0120)]]
# Middle Part
mid=[[(-40, -30), (-50, -40), (-100, -46), (-130, -40), (-1760), (-186, -30), (-186, -40), (-120, -170), (-110, -210), (-80, -230), (-64, -210), (0, -210)],[(0, -210), (64, -210), (80, -230), (110, -210), (120, -170), (186, -40), (186, -30), (1760), (130, -40), (100, -46), (50, -40), (40, -30), (0, -30)]]
#Bottom Part
bot=[[(-60, -220), (-80, -240), (-110, -220), (-120, -250),(-90, -280), (-60, -260), (-30, -260), (-20, -250), (0, -250)],[(0, -250), (20, -250), (30, -260), (60, -260), (90, -280), (120, -250),(110, -220), (80, -240), (60, -220), (0, -220)]]
turtle.hideturtle()
turtle.bgcolor('#ba161e'#Dark Red
turtle.setup(500,600)
turtle.title("Coding PLEX")
topGoto=(0,120)
midGoto=(0,-30)
botGoto=(0,-220)
turtle.speed(2)
def draw_struct(a,b):
    turtle.penup()
    turtle.goto(b)
    turtle.pendown()
    turtle.color('#fab104'#Light Yellow
    turtle.begin_fill()
    for i in range(len(a[0])):
        x,y=a[0][i]
        turtle.goto(x,y)
    
    for i in range(len(a[1])):
        x,y=a[1][i]
        turtle.goto(x,y)
    turtle.end_fill()
    
draw_struct(top,topGoto)
draw_struct(mid,midGoto)
draw_struct(bot,botGoto)
turtle.hideturtle()
turtle.done()


#Downloaded From ---- https://coding-plex.blogspot.com/


Click on the Button Below To Download the Code


Post a Comment

0 Comments