Відповідь:
Пояснення:
import random
from tkinter import *
tk = Tk()
canvas = Canvas(tk, width=500, height=500)
kolory=["black", "red", "green", "blue", "cyan", "yellow", "magenta", "azure", "brown", "coral", "grey", "khaki", "olive", "orange", "lavender", "ivory", "navy", "orchid", "plum"]
for x in range(0,500,10):
k=random.choice(kolory)
canvas.create_line(0,x,500,x, width=2, fill=k)
canvas.pack()
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Відповідь:
Пояснення:
import random
from tkinter import *
tk = Tk()
canvas = Canvas(tk, width=500, height=500)
kolory=["black", "red", "green", "blue", "cyan", "yellow", "magenta", "azure", "brown", "coral", "grey", "khaki", "olive", "orange", "lavender", "ivory", "navy", "orchid", "plum"]
for x in range(0,500,10):
k=random.choice(kolory)
canvas.create_line(0,x,500,x, width=2, fill=k)
canvas.pack()