The code runs fine up to the point where it asks you if you want to keep playing. As of now, no matter what you type in it will go through the prompt again. I need it to run again if you type anything that starts with y, and break if anything else is typed
while(str(guess) == str(random_num)):
if(int(num_sum) <= int(1)):
print("You got it right in 1 guess!")
again = str(input("Would you like to play again? "))
print()
return prompt()
elif(int(num_sum) > int(1)):
print("you got it right in " + str(num_sum) + " guesses! ")
again = str(input("Would you like to play again? "))
return prompt()
if(str(again.startswith)("y") or ("Y")): #am I using the "startswith" feature wrong?
print()
return prompt()
else:
print("Overall Results")
break