Answers for "python random password generator"

7

password generator python

import string
from random import *
characters = string.ascii_letters + string.punctuation  + string.digits
password =  "".join(choice(characters) for x in range(randint(8, 16)))
print password
Posted by: Guest on July-26-2020
5

python password generator

import random
chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789'

number = input('Please enter a number of passwords.')
try:
    number = int(number)
except:
    print("Error, please enter a number!")

length = input('Length of password?')
try:
    length = int(length)
except:
    print("Error, please enter a number!")

print('\nHere are your password(s):')

for pwd in range(number):
  password = ''
  for c in range(length):
    password += random.choice(chars)
  print(password)
Posted by: Guest on July-04-2020
1

python random password generator

import random

alph = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ\
             abcdefghijklmnopqrstuvwxyz\
             1234567890 !@#$%^&*(){}[]<>,.')
out = ''
for char in string:
    out += random.choice(alph)
    
print(out)
Posted by: Guest on April-08-2020
6

python random password generator

import random

print("Welcome to your own password Generator")

cherecters_for_Genarating_password = ("1234567890qwertyuiopasdfghjklzxcvnmQWERTYUIOPASDFGHJKLZXCVNM*&%$#@!")
try:
    
    TO_GENERATE = int(input("How many passwords you have to create:- "))
    
    #print(TO_GENERATE)
    
    Length_of_password = int(input("What should be the lenth of your password:- "))
    
    print("So these are your passwords:- ")
    #main code
    for passw in range(TO_GENERATE+1):
        print("      or")
        password = ""
        for should_apply in range (Length_of_password):
            password += random.choice(cherecters_for_Genarating_password)
        print(password)
    
    print("Are these passwords satisfing you Y/N")
    satisfing = str(input())
        
    if satisfing == "Y" or satisfing == "y":
        print("Ok sir Thanks")
    elif satisfing == "N" or satisfing == "n":
        print("So these are your passwords Again:- ")
        for passw in range(TO_GENERATE):
            password = ""
            for should_apply in range (Length_of_password):
                password += random.choice(cherecters_for_Genarating_password)
            print(password)
    else:
        print("incorrect input")
except ValueError:
    print("Incorrect input Sorry")
Posted by: Guest on June-25-2021
0

python random password generator

from tkinter import *
from random import randint

root = Tk()
root.title('Codemy.com - Strong Password Generator')
root.iconbitmap('c:/gui/codemy.ico')
root.geometry("500x300")


# Generate Random Strong Password
def new_rand():
	# Clear Our Entry Box
	pw_entry.delete(0, END)

	# Get PW Length and convert to integer
	pw_length = int(my_entry.get())

	# create a variable to hold our password
	my_password = ''

	# Loop through password length
	for x in range(pw_length):
		my_password += chr(randint(33,126))

	# Output password to the screen
	pw_entry.insert(0, my_password)


# Copy to clipboard
def clipper():
	# Clear the clipboard
	root.clipboard_clear()
	# Copy to clipboard
	root.clipboard_append(pw_entry.get())

# Label Frame
lf = LabelFrame(root, text="How Many Characters?")
lf.pack(pady=20)

# Create Entry Box To Designate Number of Characters
my_entry = Entry(lf, font=("Helvetica", 24))
my_entry.pack(pady=20, padx=20)

# Create Entry Box For Our Returned Password
pw_entry = Entry(root, text='', font=("Helvetica", 24), bd=0, bg="systembuttonface")
pw_entry.pack(pady=20)

# Create a frame for our Buttons
my_frame = Frame(root)
my_frame.pack(pady=20)

# Create our Buttons
my_button = Button(my_frame, text="Generate Strong Password", command=new_rand)
my_button.grid(row=0, column=0, padx=10)

clip_button = Button(my_frame, text="Copy To Clipboad", command=clipper)
clip_button.grid(row=0, column=1, padx=10)

root.mainloop()
Posted by: Guest on August-28-2021
0

python random password generator

123455
Posted by: Guest on December-07-2020

Code answers related to "python random password generator"

Python Answers by Framework

Browse Popular Code Answers by Language