Guest User

Untitled

a guest
Feb 16th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #random gift suggestion
  2. #use dictionary with list
  3. import random
  4. gifts = {"Bobbi": ["ring,Tiffanys", "book, Barnes and Noble"],
  5. "Mom": ["phone, Ebay", "Book, Amazon"],
  6. "Dad": ["gloves, Amazon", "Book, Barnes and Noble"]
  7. }
  8. answer = input("pick a person").strip().capitalize()
  9. #created variable to get length and one to get random number.
  10. print(random.choice(gifts[answer]))
Add Comment
Please, Sign In to add comment