Guest User

Untitled

a guest
Apr 22nd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import random
  2.  
  3. itemlist = [] #starts with empty list
  4. x=0
  5. while x != 'q':
  6. x = input("Enter item to list or type 'q' to exit \n")
  7. if x != 'q':
  8. itemlist.append(x) #adds items to list unless 'q' is entered then it moves on
  9. else:
  10. break
  11.  
  12. #print (itemlist)
  13. print("\n\nThrough the magical powers of computation we picked...", random.choice(itemlist),"\n\n") #Randomly picks item from list and prints result
Add Comment
Please, Sign In to add comment