Advertisement
Guest User

Untitled

a guest
May 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. def check_if_on_board(x, y):
  2.     '''Checks if given point (x, y) is on board'''
  3.     x_y_list = range(-10, 10)
  4.  
  5.     if x in x_y_list and y in x_y_list:
  6.         print("Punkt znajduje sie w ukladzie wspolrzednych.")
  7.     else:
  8.         print("Punkt znajduje sie poza ukladem wspolrzednych")
  9.  
  10.  
  11. check_if_on_board(1, 3)
  12. check_if_on_board(4, -3)
  13. check_if_on_board(-5, -3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement