while True:
print("-------WELCOME TO THE GAME BAGELS..-------","\n\n\nit's a guessing game so guess a 3-digit number...","\n\nguessing the number for you...","\n\nInstructions...","\nPico: one digit is correct but in the wrong place","\nFermi: one digit is correct and at the right place","\nBagels: no digit is correct \n\n")
import random
guess= str(random.randint(100,1000))
i=0
b=[]
while i<10:
i+=1
while True:
print(f"guess #{i}")
data=str(input(">"))
if len(data)!=3:
print("------WRONG------","\n\n\nplease again input the 3 digit number")
del data
continue
elif len(data)==3:
break
if data==guess:
print("U got it right congrats...")
break
for e in range(len(data)):
if data[e]==guess[e]:
b.append("Fermi")
elif data[e] in guess:
b.append("pico")
else:
b.append("Bagels")
print(b)
b.clear()
if i ==10:
print("sorry no turn left\n")
break
choice= input("you want to play again\nyes or no...\n\n")
choice.lower()
if choice=="yes":
continue
elif choice =="no":
print("\n\n-----thanks for playing-----")
break