-
Notifications
You must be signed in to change notification settings - Fork 0
Issues: Bediru21/m.bediru
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Author
Label
Projects
Milestones
Assignee
Sort
Issues list
#Random Password Generator
bug
Something isn't working
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
wontfix
This will not be worked on
#7
opened Nov 28, 2024 by
Bediru21
#Random Password Generator - www.101computing.net/random-password-generator/
import random
#A function do shuffle all the characters of a string
def shuffle(string):
tempList = list(string)
random.shuffle(tempList)
return ''.join(tempList)
#Main program starts here
uppercaseLetter1=chr(random.randint(65,90)) #Generate a random Uppercase letter (based on ASCII code)
uppercaseLetter2=chr(random.randint(65,90)) #Generate a random Uppercase letter (based on ASCII code)
#Generate more characters here
#....
#Generate password using all the characters, in random order
password = uppercaseLetter1 + uppercaseLetter2 # + ....
password = shuffle(password)
#Ouput
print(password)
#1
opened Nov 1, 2024 by
Bediru21
ProTip!
Type g i on any issue or pull request to go back to the issue listing page.