I need to write a program, that makes random black and white squares, that looks like QR codes, but I can use only tkinter and random. I was trying something like this:
def qr():
x = random.randint(1, 21)
canvas.create_rectangle(x * 10, x * 10, x + 10, x + 10, fill = 'black')
but I really don't know how to write it. I know, it's easy for someone but I'm just a beginner with programming. It should be something like that:
So thank you for every answer and have a nice day.