To print a unique ID number which is represented by a variable and it contains string of numbers . For this, first declare the unique ID then create a variable that take inputs from the keyboard. After this, create a loop that will match with your unique number (ID). Lastly, display a message if ID is matched then print ‘This is your ID number’ and if it is not matched then print ‘This is not your ID number’.
Further Explanation:
Code:
The complete code in python language for the given problem is shown below:
# Your unique ID number
id = "12345"
# Enter the ID number
number = input ("Enter an ID: ")
# Loop to match the ID number with input
while id !=number:
# Print the message
print ("This is not your ID number")
number = input ("Enter an ID: ")
print("This is your ID number:", number)
Output:
Run the commands in python, the output will be looking as below:
Enter the unique ID number: 24345
This is not your ID number
Enter the unique ID number: 1345
This is not your ID number
Enter the unique ID number: 12345
This is your ID number
Enter the unique ID number: 35645
This is not your ID number
Learn more:
1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011
2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832
Answer details:
Grade: College Engineering
Subject: Computer Science and Engineering
Chapter: Python Programming
Keyword:
Python, input, output, programming, statements, if-else, loops, print, scan. while, body, main body, char, int, variables, unique, ID number, match