# pick a number program
# Number guessing

from random import randrange  # Python's random module
from inputCheck import canBeInt # my homemade module

picked = randrange(0,3)
# integer; the number the program is thinking of

guess = input("Guess a number between 0 and 2: ")
# string; what the user typed
# check if it can be converted
if canBeInt(guess):
    # yes it can...so do the rest of the program
    numGuess = int(guess)

    if picked < numGuess:
        print("Too high; I was thinking of",picked)
    elif picked > numGuess:
        print("Too low; I was thinking of",picked)
    else:
        # they're equal
        print("Yes! I was thinking of", picked)
else: # user did not type an int
    print("Not an integer")

# hang out for one more user input
input("Press enter to exit.")

          



