Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #random gift suggestion
- #use dictionary with list
- import random
- gifts = {"Bobbi": ["ring,Tiffanys", "book, Barnes and Noble"],
- "Mom": ["phone, Ebay", "Book, Amazon"],
- "Dad": ["gloves, Amazon", "Book, Barnes and Noble"]
- }
- answer = input("pick a person").strip().capitalize()
- #created variable to get length and one to get random number.
- print(random.choice(gifts[answer]))
Add Comment
Please, Sign In to add comment