While true loop, i want to give the user another reply for his second try

 In this case, if the user puts 'N' he will get back to the first line, right?
 if the user puts again 'N', I want to give him another reply for his second retry
  • answer = input ("Stranger: Can you provide us your information ?(Y/N): ") .upper()
  • while True :
  • if answer == “Y” :
  •    break
    
  • if answer == “N”:
  •    print ("please reconsider your your answer ")
    
  •    Continue
    
  • else:
  • print ("bruv, It is a Yes or No question!! ") 
    
  • exit()
    

You should be able to introduce a counter and a code branch that is related to said counter.

can you elaborate more by giving an example using my code? (I’m a beginner)

The simplest way would be this kind of construct:

count = 0
while True:
    count += 1
    if count == 1:
        x = input("This is the first question: ")
    else:
        x = input("This is the second question and beyond: ")
    if x == 'quit':
        break

To add…

To error check the user input, I would simply add this to the end of the while loop:

elif x not in ("y", "n"):
        print("Enter y, n or quit")
        count = 0

Does that help you?

my hands kinda full rn ,i will try it when i get the chance