1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
cluponka [151]
3 years ago
7

You have a unique id number, which is represented by the variable id, containing a string of numbers. write a program that conti

nuously 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.
Computers and Technology
2 answers:
koban [17]3 years ago
8 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

-BARSIC- [3]3 years ago
7 0

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

You might be interested in
What IEEE 802.11 wireless standard supports devices only in the 5GHz range with speeds up to 4.9Gb/s because of accepting data f
yKpoI14uk [10]

The answer is 802.11ac  

802.11ac is a type if IEEE 802.11 wireless standards that supports Multiple Input, Multiple Output antennas on sending and receiving data. This type of wireless connection supports 2.4GHz signal or frequency and data speed transfer up to 4.9Gbps. Each device or antenna can run up to 400Mbps each and the maximum device it can handle is up to 8 antennas.

8 0
3 years ago
At the very lowest level what data does a computer understand?
kumpel [21]
In fact, at the lowest level, computers only understand sequences of numbers that represent operational codes (op codes for short). On the other hand, it would be very difficult for humans to write programs in terms of op codes
8 0
3 years ago
Bruno took the computer that he uses at work, and Pauline sits on the beach with her laptop computer, which she connects to the
Anika [276]

Answer:

Mobile Hotspot

Explanation:

using Mobile Hotspot you can connect to the internet using mobile data.

For this to work you should turn off the Wi-Fi in your mobile if any. We can connect more than one device using mobile hotspot

4 0
3 years ago
_______ testing is a customer test that involves placing the product within the firm to see how it performs in different applica
Maslowich

Answer: Alpha testing

Explanation:

Alpha testing is basically perform to identify the issues and bugs before release any product. This type of testing basically place the products within firm and performed different types of applications.

The alpha testing is usually perform before the release any software products. It is the combination of both white and black box testing. The main function of this testing is to simulate the users by carried out different tasks to perform.

The alpha testing is known as alpha because it is done at the end of the software development.  

7 0
4 years ago
To change the left alignment of the items in an unordered list, you set the
shusha [124]

Answer:

b. left padding for the ul element

Explanation:

To change the left alignment of the items in an unordered list, you set the left padding for the ul element.

7 0
3 years ago
Other questions:
  • A _______ acts as a security buffer between a corporation's private network and all external networks.
    7·1 answer
  • 1. Describe a system that would be dangerous if resistance were not a part of the circuit
    12·2 answers
  • ? Assessment
    10·1 answer
  • A flowchart that depicts the relationships among the input, processing, and output of an AIS is
    6·1 answer
  • FOR DIGITAL DESIGN/ PHOTOGRAPHY
    5·2 answers
  • Algorithm to find volume of cuboid​
    14·1 answer
  • Compare and contrast traditional and cloud data backup methods. Assignment Requirements You are an experienced employee of the D
    14·1 answer
  • You can enter common data in multiple worksheets by __________.
    14·2 answers
  • // This pseudocode segment is intended to compute the number
    6·1 answer
  • i installed windows 11 all looks ok except my ebay and some other sites are all white with black text no highlights or color???
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!