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]
2 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]2 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]2 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
Users report that the database on the main server cannot be accessed. A database administrator verifies the issue and notices th
navik [9.2K]

Answer: (C) Ransomware

Explanation:

The ransomware is one of the type of malware software design which is used for blocking the user accessing unauthorized and also without paying money.

The most of the ransomware software encrypt the computer accessing and the files as they demand for the payment dues for again restoring the access.  

It also encrypt the user account and the information until the correct decrypt key are get entered into the system. So, according to the given situation, the ransomware attack are experienced in an organization.  

Therefore, Option (C) is correct.

4 0
3 years ago
Which of the following ensures that dropped packets are resent?
Agata [3.3K]

Answer:

TCP

Explanation:

Transmission control protocol ensures packets loss and performs retransmission

TCP works with Internet Protocol (IP)

TCP/IP defines how computers send data packets to each other.

TCP allows transmission of information in both the direction.

Bit rate :defines the rate at which bits are transferred from one place to another

7 0
3 years ago
Being the Sales Manager of a company you have to hire more salesperson for the company to expand the sales territory. Kindly sug
andrezito [222]

Answer:

1. Identification of a vacancy and development of the job description.

2. Recruitment planning

3. Advertising

4. Assessment and Interview of applicants

5. Selection and Appointment of candidates

6. Onboarding

Explanation:

The Recruitment process refers to all the stages in the planning, assessment, and absorption of candidates in an organization. The stages involved include;

1. Identification of a vacancy and development of the job description: This is the stage where an obvious need in the organization is identified and the duties of the job requirement are stipulated.

2. Recruitment planning: This is the stage where the HR team comes together to discuss the specific ways they can attract qualified candidates for the job.

3. Advertising: The HR team at this point seeks out job sites, newspapers, and other platforms that will make the opportunities accessible to applicants.

4. Assessment and Interview of applicants: Assessments are conducted to gauge the candidates' knowledge and thinking abilities. This will provide insight into their suitability for the job.

5. Selection and Appointment of candidates: Successful candidates are appointed to their respective positions. A letter of appointment is given.

6. Onboarding: Candidates are trained and guided as to the best ways of discharging their duties.

6 0
2 years ago
How to see how many words you have on google docs?
liberstina [14]
In the menu bar, click Tools > Word Count or hit Ctrl/Cmd + Shift + C.
4 0
3 years ago
Olivia works at a company that creates mobile phones. She wanted to estimate the mean amount of time their new phone's battery l
Kisachek [45]

An swer:  

                               

 E. xpl an ation:    

                               

3 0
2 years ago
Other questions:
  • A device (or a software program on a computer) that can monitor data traveling on a network is known as a socket sniffer. ______
    15·1 answer
  • The help desk received a call from a user who cannot get any print jobs to print on the locally shared printer. While questionin
    10·2 answers
  • How computer can affect the life of people?
    15·1 answer
  • Which of the following statements about the break statement is false? Group of answer choices Common uses of the break statement
    12·1 answer
  • What is the relationship between interoperability and the other quality attributes highlighted in this book? For example, if two
    5·1 answer
  • Please help
    11·1 answer
  • Explain the function of different flags in the 8086<br>​
    12·1 answer
  • 13. By adding built-in writable memory to its cartridge, Nintendo’s _________________ was the first console game that gamers cou
    9·1 answer
  • Dunbar's number, 150, refers to the number of:
    5·1 answer
  • PLS HELP MEE it's due in 2 minutes​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!