Hello,
I am very new to python (a few days) and am wondering how i should go about generating random gridpoints and comparing them to ones inputted by the user. I am completely lost on how i can get the input of the x and y coordinates from the user and compare them to the ones that were randomly generated earlier. This is how I think I should be generating the random coordinate points (most likely wrong or inefficient way to do so)
[LIST]
[*]import random # import random module
[*]#define coordinate point function
[*]def coordp(x, y):
[*] return(x, y)
[*]#declare randcoord var
[*]randcoord = 0
[*]#generate random number
[*]randcoord = coordp(random.randrange(1,21,1),random.randrange(1,21,1))[/LIST]