Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- import sys
- def main():
- name = input("What is your name? ")
- num_adjectives = int(input("How many insults? "))
- num_nouns = int(input("How many nouns? "))
- Adjective = set()
- Adjective.add("Dumb")
- Adjective.add("Insane")
- Adjective.add("Ugly")
- Adjective.add("Mouse")
- Adjective.add("Loser")
- Adjective.add("Elf")
- if num_adjectives > 3:
- print('Error You Must Enter Number Between 1-3')
- sys.exit()
- Nouns = set()
- Nouns.add("Weird")
- adjectives = random.sample(Adjective, num_adjectives)
- nouns = random.sample(Nouns,num_nouns)
- insults = ", ".join(adjectives)
- n = ", ".join(nouns)
- print(name, "is a", insults, n) ## When everything is done generating, print out the final line (Name is a (1-3)
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement