repl.it
@heyitsmarcus/

Password Generator

Python

No description

fork
loading
Files
  • main.py
  • password.txt
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#not my code, help file for Repl Talk->Ask

import random
print ("""This is my simple password generator.""")
letters = "abcdefghijklmnopqrstuvwxyz"
symbols = "[email protected]#[email protected]*"
numbers = "123456789"
length = int(input("How long do you want your password? "))
password = ""
for c in range(length):
  r = random.randint(1,3)
  if (r == 1):
  	password += random.choice(letters)
  elif (r == 2):
	  password += random.choice(symbols)
  elif (r == 3):
	  password += random.choice(numbers)
print (password)
?