So i shortened my code to make it easier to read
g = True
def welcome_message():
print("welcome")
while g == True:
g = False
print(welcome_message())
c = input("Do you understand ('yes' or 'no')")
if c == "yes":
print("okay")
elif c == "no":
g = True
else:
print("That is not a valid input. Please try again.")
g = True
However, when I run this code, I expect the code to print "welcome" and ask the person running the code if they understand. However, this is the result:
welcome
None
Do you understand ('yes' or 'no')
Why does my code show a "None" at that location?