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
g using pythonThe following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) —
Klio2033 [76]

Answer:

The code in python is attached.

Explanation:

  1. A function called CaloriesBurned is defined
  2. The function accepts 4 inputs: age,weight,heart_rate,time
  3. Two variables are assigned for the calories burned by men and women
  4. finally, the function returns the varaibles caloriesburned_men and caloriesburned_women

5 0
4 years ago
Read 2 more answers
How do you send a word document email???
suter [353]

for a word document in an email, you open email and click on the paperclip, then go into your files and find the word document (save it first) then click on that and write the email and send it.
4 0
4 years ago
A task-oriented leader is ideal for a creative workplace.
klio [65]
CORRECT ANSWER:
True
8 0
3 years ago
Read 2 more answers
Given the following business scenario, create a Crow’s Foot ERD using a specialization hierarchy if appropriate. Two-Bit Drillin
Roman55 [17]

Answer:

Crows Foot ERD of TWo-Bit Drilling Company  

  • The circumstance is that organization holds the data of representative and protection wards in which a worker can have more than one ward or no ward however all the wards ought to be snared with just a single worker.  
  • The representative table contains all data of worker and the protection subordinate table contain data of worker's needy.  
  • A few representatives are examiners which contains the extra information of date of accreditation and confirmation recharging date.  
  • The EMPLOYEE table contains EMP_NO, EMP_NAME, EMP_DATEHIRED, EMP_TITLE, EMP TYPE and EMP SSN as traits.  
  • The INSURANCE_ DEPENDENT table contains subordinate EMP_NO, DEPENDENT_NAME, DEPENDENT_DOB and DEPENDENT_RELATIONSHIP (relationship of ward and worker).  
  • One Employee can be identified with at least 0 Dependents however any Dependent is identified with just a single Employee.  
  • EMP_TYPE is the subtype discriminator which tells the event of INSPECTOR.

The Attached file Show the Crow Foot ERD

6 0
3 years ago
Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
alexandr1967 [171]

Answer:

a=input("Amount in pennies")

b=int(a)

dollars=0

dimes= 0

quarters=0

nickels=0

pennies = 0

dollars = int(b/100)

b= b- dollars *100

quarters=int(b/25)

b=b-quarters*25

dimes = int(b/10)

b = b -dimes*10

nickels=int(b/5)

b=b - nickels * 5

pennies = b

print(dollars)

print(dimes)

print(nickels)

print(pennies)

Explanation:

The required program is in answer section. Note, the amount is entered in pennies.

7 0
3 years ago
Other questions:
  • What is an (CR) Optical character recognition?
    13·2 answers
  • Hard drives have the largest capacity of any storage device. <br> a. True <br> b. False
    6·2 answers
  • An adiabatic capillary tube is used in some refrigeration systems to drop the pressure of the refrigerant from the condenser lev
    15·1 answer
  • What is the protocol developed for the wireless network communications? explain?
    8·1 answer
  • . What type of device is a computer? Where does it use?​
    14·1 answer
  • Suppose that we time three functions in Python: linear searching, binary searching, and sorting. We determine their running time
    13·1 answer
  • What is the main function of a file extension?
    10·1 answer
  • Access your Practice Lab titles Access your exercise content Reports and files Access your settings Access help and support Comp
    12·1 answer
  • Irma bought a gaming computer at Bestbuy 3 years ago and it’s been on ever since. Her computer is staring to feel unstable and a
    10·1 answer
  • Imagine that you need to prepare for three end-of-term tests. What steps will you take to make sure your study time is well spen
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!