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
Anna35 [415]
4 years ago
7

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 continue to prompt the user until the user has not chosen one of the common passwords.
Computers and Technology
1 answer:
Airida [17]4 years ago
7 0

Answer:

userpassword = {"123456",

"password",

"123456789",

"12345678",

"12345",

"111111",

"1234567",

"sunshine",

"qwerty",

"abc123"}

#We define the function that prompts the user for a password

def user_passinput():

   password = input("Choose enter a password: ")

   return password

#Function that checks the password

def check_password():

   count = 0

   check_pass = user_passinput()

   if check_pass in userpassword:

       print("Yay!! you entered the correct password")

   elif count <10:

           count = count+1

           print("Please try again")

          user_passinput()

   else:

       print ("Maximum tries exceeded")

check_password()

Explanation:

Using Python for this code, in the first line of the code, we list the dictionary of 10 most common passwords searched on the web. In line 12, we define the function that will demand the user to enter a password and return the value the user entered. Line 16 defines the function that checks if the password is common and prints to the screen either "Yay!! you entered the correct password", "Please try again" or "Maximum tries exceeded" depending on the condition that is satisfied. The last line of the code calls the check_password() function, which actually initiates the designed program.

You might be interested in
Your recovery/recycling machine has r-502 refrigerant in it. you now have to recover refrigerant from a unit with r-22. what mus
zimovet [89]
Recover as much of the R-502 from the recovery unit as possible, change filter, and evacuate. In addition, to alter the compressor on a system containing R-410A, the person must isolate the compressor then evacuate the isolated section of the system to atmospheric pressure and hold. If system pressure does not increase, then remove the compressor. The recovered refrigerant may encompass acids, moisture and oils and every air conditioning or refrigerating system should be secure by a pressure relief device. 
5 0
3 years ago
How is a computer and a iphone different
MaRussiya [10]
A computer is a big screen and iphone is a handheld device
6 0
3 years ago
Why do many experts recommand longer time horizonal if you are doing high risk investment
Lapatulllka [165]

Answer:In general, the longer your time horizon, the better you can handle fluctuations in value and take more risk in order to reap greater rewards.

Explanation:

5 0
3 years ago
A simple CPM network has five activities, A, B, C, D, and E. A is an immediate predecessor of C and of D. B is also an immediate
Dmitrij [34]

Answer:

True

Explanation:

There are four paths in this network. A is an immediate predecessor of C and of D. B is also an immediate predecessor of C and of D. C and D are both immediate predecessors of E. Given the above scenario

4 0
3 years ago
Thank you very much for your email. ...... was very interesting​
Fynjy0 [20]

Answer:

hi everyone how was your day :)

Explanation:

6 0
4 years ago
Other questions:
  • How do you do these questions? The first two questions could have multiple answers and the third is one answer only.
    7·1 answer
  • Video-sharing sites allow videos to be uploaded in which file format? A. .avi B. .svg C. .tiff D. .xls
    5·1 answer
  • Rows within a spreadsheet are identified by:
    8·1 answer
  • As the demand for goods and services decreases, job growth.
    14·2 answers
  • What are the text or graphics that are lighter than the main text located in a document's background called?
    10·1 answer
  • Please help!!! I am very confused about this question!
    10·1 answer
  • How much money did Uta initially invest?$180.00$320.00$352.48$471.70
    14·1 answer
  • Cheng, a student, is researching a company's profile on a professional networking website. In what way will this kind of researc
    13·1 answer
  • 2. Why do old video games have large pixels and images with jagged edges?
    6·1 answer
  • write a recursive function that accepts an integer argument, n. the function should display n lines of asterisks on the screen,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!