Коммит 69fef0ec создал по автору alexei.b.10's avatar alexei.b.10
Просмотр файлов

Добавил новый файл

владелец 52cf35f7
from tkinter import *
coords = [[0, 0], [10, 0], [10, 10], [20, 10], [20, 0], [30, 0], [30, 20], [0, 20]]
nc = [0, 0]
root = Tk()
root.title('ИТ марафон')
root.geometry('500x500')
canvas = Canvas(bg='#66A3D2', width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
nc[0] = int(input())
nc[1] = int(input())
m = int(input())
max_c = 0
for c in coords:
for i in range(2):
c[i] = c[i] * m + nc[i]
max_c = max(c)
if max_c <= 500:
canvas.create_polygon(coords, fill='#AFF53D', outline='#5D016D', width=2)
else:
print('Размер фигуры превышает размер поля')
root.mainloop()
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать