Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- def drawing():
- window = turtle.Screen()
- window.bgcolor("yellow")
- board = turtle.Turtle()
- board.forward(a)
- board.left(120)
- board.forward(b)
- board.left(120)
- board.forward(c)
- window.exitonclick()
- a = int(input("Zadejte stranu A:"))
- b = int(input("Zadejte stranu B:"))
- c = int(input("Zadejte stranu C:"))
- if (a + b) < c:
- valid = False
- elif (a + c) < b:
- valid = False
- elif (b + c) < a:
- valid = False
- else:
- valid = True
- if valid == True:
- if (a > 250) or (b > 250) or (c > 250):
- a = a / 16
- b = b / 16
- c = c / 16
- elif (a < 10) or (b < 10) or (c < 10):
- a = a * 16
- b = b * 16
- c = c * 16
- drawing()
- else:
- print("Trojúhelník nelze sestrojit.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement