Ответ:
from tkinter import *
root = Tk()
color = Frame(root)
color.pack(ipadx=10)
Label(color, background='red', width=50).pack(side='top')
Label(color, background='orange', width=50).pack(side='top')
Label(color, background='yellow', width=50).pack(side='top')
Label(color, background='green', width=50).pack(side='top')
Label(color, background='light blue', width=50).pack(side='top')
Label(color, background='blue', width=50).pack(side='top')
Label(color, background='purple', width=50).pack(side='top')
Label(color, background='black', width=50).pack(side='top')
Label(color, background='white', width=50).pack(side='top')
Label(color, text='Радуга связывает флаг России и Украины').pack(side='top')
root.mainloop()
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
from tkinter import *
root = Tk()
color = Frame(root)
color.pack(ipadx=10)
Label(color, background='red', width=50).pack(side='top')
Label(color, background='orange', width=50).pack(side='top')
Label(color, background='yellow', width=50).pack(side='top')
Label(color, background='green', width=50).pack(side='top')
Label(color, background='light blue', width=50).pack(side='top')
Label(color, background='blue', width=50).pack(side='top')
Label(color, background='purple', width=50).pack(side='top')
Label(color, background='black', width=50).pack(side='top')
Label(color, background='white', width=50).pack(side='top')
Label(color, background='blue', width=50).pack(side='top')
Label(color, background='red', width=50).pack(side='top')
Label(color, background='blue', width=50).pack(side='top')
Label(color, background='yellow', width=50).pack(side='top')
Label(color, text='Радуга связывает флаг России и Украины').pack(side='top')
root.mainloop()
Объяснение: