1import turtle
2
3turtle.forward(50)
4turtle.left(90)
5turtle.forward(50)
6turtle.left(90)
7turtle.forward(50)
8turtle.left(90)
9turtle.forward(50)
10turtle.left(90)
11
1#Python program to draw color filled square in turtle programming
2import turtle
3
4t = turtle.Turtle()
5t.fillcolor('blue')
6t.begin_fill()
7for i in range(4):
8 t.forward(150)
9 t.right(90)
10t.end_fill()
1a = int(input("enter a real number: "))
2sqrt = a**(1/2)
3print("the square root of ",a ,"is",sqrt)
1def square_root(num):
2 return num**0.5
3#prints out 4
4print(square_root(16))
5#prints out 10
6print(square_root(100))
1import turtle
2
3
4turtle.begin_fill()
5turtle.forward(100)
6turtle.right(90)
7turtle.forward(100)
8turtle.right(90)
9turtle.forward(100)
10turtle.right(90)
11turtle.forward(100)
12turtle.end_fill()
13turtle.right(145)
14turtle.forward(50)