can you do random.choice with functions?
Hey Everyone, Would someone be able to look at my code and let me know what I'm doing wrong? I'm trying to randomly print either a variable or a function from a list. When the function gets called it comes out as a hex. Any help is appropriated Also if anyone sees anything in the code that should be changed, please let me know. Thank you! The codes also in this link: https://code.sololearn.com/c9a13A15A5a1 import random def num_guess(): number = random.randrange(1, 20) print(number) print("Guess a number!") guess = int(input()) def divisible(guess, number): if guess % number == 0: print("You're guess was divisable by the number") else: return False between = ("The number is between " + str(number - 2) + " and " + str(number + 2)) multiable = "hint2" hint = [between, divisible] score = 100 while (number != 'guess'): if score < 50: print("You loose!") break elif guess == number: print("You guessed the number! \n") break elif guess < number: print("You guessed low") print(random.choice(hint)) score -= 10 guess = int(input()) else: print("You guessed high") print(random.choice(hint)) score -= 10 guess = int(input()) print("You're score is: " + str(score)) num_guess()