[Solved] How do I make it so that the code will ask you your name again if the user answers no after my if statement?


Just a simple and quick answer, maybe there is easier way.

fullName = input("Hello there, what is your name?")
fName, sName = fullName.split()

print("So, your first name is", fName)
print("and your second name is", sName)
answer = input("Is this correct?")

while not (answer == "Yes" or answer == "yes"):
    fullName = input("Hello there, what is your name?")
    fName, sName = fullName.split()
    print("So, your first name is", fName) 
    print("and your second name is", sName)
    answer = input("Is this correct?")

1

solved How do I make it so that the code will ask you your name again if the user answers no after my if statement?