The goal is for the computer to guess a number given an upper and lower bound, the computer should take no as an input and run the program again until a yes is given.
This is the code I am using right now, but the loop only ever runs once dues to where the return function is. If I take that out and jump directly to print it runs continuously.
import random
num1 = int(input("enter your minumum value: "))
num2 = int(input("enter your maximum value: "))
def number_choice(num1,num2):
guess = "no"
while guess == "no":
return random.choice(range(num1,num2))
print (number_choice(num1,num2))
guess = input("is that your number, enter yes or no: ")