How do I implement collision into my code? : from graphics import*
import time
import random 

def main():

    

    numx=random.randint(10,700)
    

    wn=GraphWin("AK",700,700)
    wn.setBackground("white")

    msg=Text(Point(25,30),"Score")
    msg.setSize(12)
    msg.setTextColor('blue')
    msg.draw(wn)

    inch=Entry(Point(60,30),2)
    inch.setFill('white')
    inch.draw(wn) 

    sqrg=Rectangle(Point(330,650),Point(430,665))
    sqrg.setFill("red")
    sqrg.draw(wn)

    blx=Circle(Point(numx,80),20)
    blx.setFill("blue")
    blx.draw(wn)


    xval=10
    yval=0
    wn.getMouse()
    for i in range(150):
        sqrg.move(xval,yval)
        symbl=wn.checkKey()
        if symbl=="Right":
                xval=10
                yval=0
        if symbl=="Left":
                xval=-10
                yval=0
        time.sleep(0.08)
        blx.move(0,20)
        
       
        

    
    

    
    

    
                


main()




I'm very confused my professor is very confusing, and I need to do this for a project where when collision is detected the score goes up.