Guest User

Untitled

a guest
Nov 8th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. pole_trojkata = 1
  2. pole_kwadratu = 3
  3. while True:
  4. print("wybierz 1.trojkat\n 2.kwadrat")
  5. odp = input()
  6. try:
  7. odp_int = int(odp)
  8. if odp_int==0: #wyjscie z programu
  9. break
  10. elif odp_int==1:
  11. print(pole_trojkata)
  12. elif odp_int==2:
  13. print(pole_kwadratu)
  14. else:
  15. print("wybrano co innego niz pozwolilem")
  16. except:
  17. print "Unexpected error:", sys.exc_info()[0]
  18. raise
Advertisement
Add Comment
Please, Sign In to add comment