Advertisement
ForestFox

Untitled

Feb 8th, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class Figura:
  2. def __init__(self, x, y):
  3. self.x, self.y = x, y
  4. def draw(self):
  5. for x in range(20, -21, -1):
  6. for y in range(-20, 21):
  7. if y == self.x and x == self.y:
  8. print("*", end ="")
  9. elif x == 0 and y == 0:
  10. print("+", end="")
  11. elif x == 0:
  12. print("—", end ="")
  13. elif y == 0:
  14. print("|", end ="")
  15. else:
  16. print(" ", end ="")
  17. print()
  18. a = Figura(-1, -8)
  19. a.draw()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement