Simple Python Project for Beginner-04
Project-Drawing Shapes
Source code:
import turtleturtle.color('dodgerblue')
#fix the position not necessary
turtle.pensize(3)
turtle.speed(3)
turtle.penup()
turtle.backward(50)
turtle.right(90)
turtle.forward(100)
turtle.left(90)
turtle.pendown()
#fix the position not necessary
#main code
edges = int(input('Please enter the number of edges:'))
for i in range(edges):
turtle.forward(140)
turtle.left(360/edges)
turtle.exitonclick()
এভাবে আমরা যা ইনপুট দিব ঠিক তত বাহুর একটি ক্ষেত্র আকা হয়ে যাবে।

কোন মন্তব্য নেই