Ask Question
2 March, 12:44

You have a unique id number, which is represented by the variable id, containing a string of numbers. write a program that continuously takes strings to standard input. if the string is not your id number, print "this is not your id number." if it is, print "this is your id number: " followed by the number, and terminate the loop.

+5
Answers (1)
  1. 2 March, 14:47
    0
    idNumber = "123456"

    idNo = input ("Enter the unique ID number: ")

    while idNumber! = idNo:

    print ("This is not your ID number.")

    idNo = input ("Enter the unique ID number: ")

    print ("This is your ID number: ", idNo)

    Output:

    sh-4.3$ python3 main. py

    Enter the unique ID number: 2345

    This is not your ID number.

    Enter the unique ID number: 4563

    This is not your ID number.

    Enter the unique ID number: 12345

    This is not your ID number.

    Enter the unique ID number: 123456

    This is your ID number: 123456
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “You have a unique id number, which is represented by the variable id, containing a string of numbers. write a program that continuously ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers