Question

Write a python program to create new, more secure, account passwords.

Write a python program to create new, more secure, account passwords.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer) The Python program to create a new, secure password is below:

I am using string.ascii_letters , string.digits and string.punctuation along with random choice function.

Program:

import random
import string

def randomStringwithDigitsAndSymbols(stringLength=10):
"""Generate a random string of letters, digits and special characters """

password_characters = string.ascii_letters + string.digits + string.punctuation
return ''.join(random.choice(password_characters) for i in range(stringLength))

print ("Random Password: ", randomStringwithDigitsAndSymbols() )

CODE AND OUTPUT SCREENSHOT


Add a comment
Know the answer?
Add Answer to:
Write a python program to create new, more secure, account passwords.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a password cracker program for the passwords created according to the policy outlined in assignment...

    Write a password cracker program for the passwords created according to the policy outlined in assignment 15 (exactly 8 characters: 5 letters and 3 digits). You are to write a function that takes one parameter that is a hash of a password and should return a possible password (a string) that has the same hash. Use python secure hash function sha1 from hashlib module. Hint: brute force method will be more than adequate to the task.   Please I need it...

  • Write a Python program which simulates how a bank account works. (1) create a global constant...

    Write a Python program which simulates how a bank account works. (1) create a global constant INTEREST_RATE as the interest rate, which is assigned value 0.01. (2) create a global variable balance, which is initialized to 1000. (3) define a function named deposit which takes no parameter, it asks user to enter the amount of money that will be deposited into this account, then updates the global variable balance (which should increase by the amount of the deposit) and prints...

  • Write a Python (3) program to simulate** a buffer overflow (this is a new script, not...

    Write a Python (3) program to simulate** a buffer overflow (this is a new script, not part of the intranet assignment), then implement input validation to prevent it. There are two parts to this assignment: 1) The program should display a welcome message and prompt the user for a username. Create a simulated buffer overflow condition by allowing a user to input more data than the size of the allocated memory (causing the program to crash). 2) Implement input validation...

  • Write a Python program to create some recursive artwork, using the turtle module by using recursive...

    Write a Python program to create some recursive artwork, using the turtle module by using recursive functions. This program should look very creative, wanna get some points!

  • Write a python program using Object Oriented and do the following: 1. create class "cat" with...

    Write a python program using Object Oriented and do the following: 1. create class "cat" with the following properties: name, age (create constructor method: def __init__) 2. create class "adopter" with the following properties: name, phone 3. create class "transaction" with these properties: adopter, cat (above objects) cat1 = "puffy, 2" adopter1 = "Joe, 123" Test your program: Joe adopts puffy. Print: "Per Transaction 1 <joe> has adopted <puffy>" this can only be done with object oriented programming, no way...

  • Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a...

    Write a python program and pseudocode The Program Using Windows Notepad (or similar program), create a file called Numbers.txt in your the same folder as your Python program. This file should contain a list on floating point numbers, one on each line. The number should be greater than zero but less than one million. Your program should read the following and display: The number of numbers in the file (i.e. count them) (counter) The maximum number in the file (maximum)...

  • Write a sql program for password requirment: I just need sql query. Passwords are required for...

    Write a sql program for password requirment: I just need sql query. Passwords are required for all accounts: Passwords must have a minimum length of 10 characters; Passwords must have complexity (at least one numeric mixed with alphabetic characters. Upper case and special characters will be allowed but not forced); Passwords must be changed at least every 90 days; and, Passwords must be forced to be different than the previous 6 passwords. Intruder lockout settings are required for all accounts:...

  • 1. Use Turtle Graphics to create a tic tac toe grid in Python. Write a Python...

    1. Use Turtle Graphics to create a tic tac toe grid in Python. Write a Python program that prints a tic tac toe grid. Use Turtle Graphics to create the graphic.

  • THIS IS A PROGRAM FOR PYTHON THIS IS A PROGRAM FOR PYTHON THIS IS A PROGRAM...

    THIS IS A PROGRAM FOR PYTHON THIS IS A PROGRAM FOR PYTHON THIS IS A PROGRAM FOR PYTHON This time, we will write a program that uses functions to parse through all those names in a List object (see below for the "us_counties" list) to count the number of occurrences each vowel (a, e, i, o, u) has in all the names. We want 5 separate answers, one for each vowel. Not looking for output here. All my solution will...

  • Write a program that asks the user to enter a password, and then checks it for...

    Write a program that asks the user to enter a password, and then checks it for a few different requirements before approving it as secure and repeating the final password to the user. The program must re-prompt the user until they provide a password that satisfies all of the conditions. It must also tell the user each of the conditions they failed, and how to fix it. If there is more than one thing wrong (e.g., no lowercase, and longer...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT