Draw Spider web using Python Turtle

import turtle as t

t.speed(2)

for i in range(6):

   t.forward(150)

   t.backward(150)

   t.right(60)

side = 50

t.fillcolor("Orange")

t.begin_fill()

for i in range(15):

   t.penup()

   t.goto(0, 0)

   t.pendown()

   t.setheading(0)

   t.forward(side)

   t.right(120)

   for j in range(6):

      t.forward(side-2)

      t.right(60)

   side = side - 10 

t.end_fill()

turtle.done()


Program for Extended Euclidean algorithms

def gcdExtended(a, b):

if a == 0 :

return b,0,1

gcd,x1,y1 = gcdExtended(b%a, a)

x = y1 - (b//a) * x1

y = x1

return gcd,x,y

a, b = 35,15

g, x, y = gcdExtended(a, b)

print("gcd(", a , "," , b, ") = ", g)