while name will always be True so you may as well just use while True.
Indentation should be 4 spaces.
You can use f strings.
if name is a constant use capital letters otherwise lowercase is ok.
Indentation should be 4 spaces.
You can use f strings.
if name is a constant use capital letters otherwise lowercase is ok.
NAME = "Ed" while True: guess = input("what is the name") if guess != NAME: print(f"{guess} is wrong") else: print(f"{guess} is the right name") break