Ask Question
30 August, 05:42

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.

+3
Answers (1)
  1. 30 August, 07:08
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers