a = "apple"
b = ""
count = 0
limit = 3
out = False
while a != b and not(out):
if count < limit:
b = input("enter the word: ")
count += 1
else:
out = True
if out:
print("try again")
print("success!")
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
a = "apple"
b = ""
count = 0
limit = 3
out = False
while a != b and not(out):
if count < limit:
b = input("enter the word: ")
count += 1
else:
out = True
if out:
print("try again")
else:
print("success!")