Computer programming tutorials , C language tutorial, C programming language,
C programming language, Coding tutorials,
Competitive programming. programming languages , programming languages projects,
projects for beginners, learn to code for projects,
""" Program to create a shell structure Source : CODE PROBLEM (Youtube) """ import turtle trt= turtle.Turtle() # create turtle object scr = turtle.Screen() # create screen object scr.bgcolor('black') colors = ['red', 'orange', 'yellow','green', 'blue', 'indigo', 'violet','skyblue'] trt.pensize(3) # set the width of the drawing pen trt.speed(0) # the fastest speed dis = 292 # initial value for c in colors: # using different colors at each iteration trt.color(c) for j in range(9): trt.left(10) for i in range(3): trt.forward(dis) trt.left(119) dis -= 4 trt.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen
Comments
Post a Comment