# Import turtle packageimportturtle# Creating a turtle screen objectsc=turtle.Screen()# Creating a turtle object(pen)pen=turtle.Turtle()# Defining a method to form a semicircle# with a dynamic radius and colordefsemi_circle(col,rad,val):# Set the fill color of the semicirclepen.color(col)# Draw a circlepen.circle(rad,-180)# Move the turtle to airpen.up()# Move the turtle to a given positionpen.setpos(val,0)# Move the turtle to the groundpen.down()pen.right(180)# Set the colors for drawingcol=['violet','indigo','blue','green','yellow','orange','red']# Setup the screen featuressc.setup(600,600)# Set the screen color to blacksc.bgcolor('black')# Setup the turtle featurespen.right(90)pen.width(10)pen.speed(7)# Loop to draw 7 semicirclesforiinrange(7):semi_circle(col[i],10*(i+8),-10*(i+1))# Hide the turtlepen.hideturtle()