Можете пожалуйста исправить этот код так, чтобы рисунок был больше похож на виселицу
код:
def draw_hangman():
if error_count >= len(hangman_parts):
return
part = hangman_parts[error_count]
if part == 'head':
canvas.create_oval(50, 50, 100, 100)
elif part == 'body':
canvas.create_line(75, 100, 75, 200)
elif part == 'left arm':
canvas.create_line(75, 125, 50, 150)
elif part == 'right arm':
canvas.create_line(75, 125, 100, 150)
elif part == 'left leg':
canvas.create_line(75, 200, 50, 225)
elif part == 'right leg':
canvas.create_line(75, 200, 100, 225)
elif part == 'stick_bg':
canvas.create_line(150, 225, 150, 20)
elif part == 'stick_sm':
canvas.create_line(150, 20, 100, 20)
elif part == 'rope':
canvas.create_oval(45, 125, 55, 135)
elif part == 'rope_oval':
canvas.create_oval(95, 125, 105, 135)
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.