I was considering just how random (or pseudorandom in fact) the random.randint()
method is and came up with this:
import random
import tkinter as tk
from tkinter import Canvas
root = tk.Tk()
# creat the root window
root.geometry("800x400")
root.title("Random Plot")
root.resizable(False, False)
C = Canvas(root, bg="#BABDB6", height=400, width=800)
n1 = 10
n2 = 780
for y in range (5, 400, 5):
for x in range(100):
r = random.randint(n1,n2)
a = C.create_rectangle(r, y, r, y, fill = 'black')
C.grid()
root.mainloop()
Fairly random I’d say.