Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- def muffet():
- print("Little Miss Muffet, Sat on a tuffet, Eating her curds and whey;")
- print("Along came a spider, Who sat down beside her, and frightened Miss Muffet away")
- def happy_birthday(name):
- print("Happy Birthday to You")
- print("Happy Birthday to You")
- print("Happy Birthday Dear " + name)
- print("Happy Birthday to You.")
- #Password function based on printable ascii characters.
- def password(len):
- pwd = ""
- for p in range(len):
- ascii_num = randint(33,126)
- #exclude some confusing characters
- while ( (ascii_num in range(44,47)) or (ascii_num in range(94,97)) ):
- ascii_num = randint(33,128)
- pwd = pwd + chr(ascii_num)
- return pwd
- muffet()
- happy_birthday("Frank")
- print("Password = : " + password((16)))
Add Comment
Please, Sign In to add comment