Ответ:import tkinter as tk
root = tk.Tk()
canvas = tk.Canvas(root, width=400, height=400)
canvas.pack()
# draw boat
canvas.create_polygon(50, 350, 200, 350, 200, 300, 150, 250, 100, 300, fill="brown", outline="black")
canvas.create_polygon(150, 250, 150, 150, 200, 200, fill="brown", outline="black")
canvas.create_polygon(150, 150, 200, 100, 200, 200, fill="white", outline="black")
# draw sail
canvas.create_polygon(200, 100, 300, 100, 300, 300, 200, 300, fill="white", outline="black")
canvas.create_line(200, 300, 300, 100)
root.mainloop()
Объяснение:
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:import tkinter as tk
root = tk.Tk()
canvas = tk.Canvas(root, width=400, height=400)
canvas.pack()
# draw boat
canvas.create_polygon(50, 350, 200, 350, 200, 300, 150, 250, 100, 300, fill="brown", outline="black")
canvas.create_polygon(150, 250, 150, 150, 200, 200, fill="brown", outline="black")
canvas.create_polygon(150, 150, 200, 100, 200, 200, fill="white", outline="black")
# draw sail
canvas.create_polygon(200, 100, 300, 100, 300, 300, 200, 300, fill="white", outline="black")
canvas.create_line(200, 300, 300, 100)
root.mainloop()
Объяснение: