Ask Question
5 January, 02:00

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. 5 January, 02:21
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers