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
Novosadov [1.4K]
3 years ago
10

Search the web to discover the 10 most common user-selected passwords, and store them in an array. Design a program that prompts

a user for a password, and continues to prompt the user until the user has not chosen one of the common passwords. Ensure that you store their password and can add that to the list so they cannot choose that password when they must change their password in the future.
Computers and Technology
1 answer:
Aleonysh [2.5K]3 years ago
6 0

Answer:

passwords = ["123456", "123456789", "qwerty", "password", "111111", "12345678", "abc123", "1234567", "password1", "12345"]

used_passwords = []

while True:

   password = input("Choose a password: ")

   

   if password in passwords:

       print("You must not choose a common password!")

       continue

   elif password in used_passwords:

       print("You used this password before. Choose a new one.")

       continue

   else:

       used_passwords.append(password)

       break

Explanation:

*The code is in Python.

Initialize the passwords array with 10 most common user-selected passwords

Initialize the used_passwords array as empty

Create an infinite while loop. Inside the loop, ask the user to choose a password. Check if entered password is in the passwords or not. If it is, print a warning and ask the user to choose again using continue statement. If the entered password is in the used_passwords, print a warning message and ask the user to choose again using continue statement. If the previous conditions are not satisfied, it means the password is valid. Add the password to the used_passwords array and stop the loop using break statement.

You might be interested in
Which component of a computing device drains the battery the fastest?(1 point)
Lostsunrise [7]
The display screen since it’s always bright
8 0
3 years ago
Read 2 more answers
What is computer science
solong [7]

Answer:

computer science is the study of the principles and use of computers.

Explanation:

8 0
3 years ago
Read 2 more answers
Would you expect all the devices listed in bios setup to also be listed in device manager? would you expect all devices listed i
katen-ka-za [31]
<span>Would you expect all the devices listed in bios setup to also be listed in device manager? = Yes
Would you expect all devices listed in device manager to also be listed in bios setup? = No, the BIOS doesn't know anything about your peripherals etc. that is all managed by the OS.</span>
6 0
3 years ago
Which of the following is used to allocate memory for the instance variables of an object of a class?1. the reserved word public
kodGreya [7K]

Answer:

The correct answer to the following question will be 2. the operator new.

Explanation:

New operator is used to allocating the memory to the instance object.The new object can be created by using a "new" keyword in java .

Syntax of using 'new' operator is :

class_name object_name=new class_name() // it allocated the memory to the class

For Example :

ABC obj = new ABC;  

Now, this time obj points to the object of the ABC class.

obj = new ABC ();

call the construction of ABC class

3 0
3 years ago
What job does a front-end developer perform?
alina1380 [7]

Answer:

They manage making websit/es beautiful. Basically how brainly is setup? The layout is nice? Front end developers are responsible for why webpages look pretty or nicely done. <em>fun fact, my dream job is a front end developer!</em>

5 0
3 years ago
Other questions:
  • Are there any tips or helpful advice for people who want to learn Photoshop?
    10·1 answer
  • Select the correct answer.
    8·1 answer
  • How to get the blade out of a pencil sharpener?
    9·1 answer
  • Outline the things that Mccann needs to do right away
    13·1 answer
  • Unicode is a world standard to represent _________________
    10·1 answer
  • Give an example of a class and an example of an object. Describe what a class is, what an object is, and how they are related. U
    6·1 answer
  • Which spreadsheet toolbar displays options such as Cut and Paste?
    11·2 answers
  • A program is
    7·1 answer
  • What does the sign (#) mean in manuscript edpm<br> and also what does (DEL)
    15·1 answer
  • What is a computer?write any four features of computer​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!