Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. import random
  2.  
  3.  
  4. keywords = ["screen", "cracked", "wet", "display", "button", "volume", "speakers", "sound"]
  5.  
  6. while True:
  7. try:
  8. help = input("What is wrong with your phone? ")
  9. break
  10. except ValueError:
  11. print ("Error")
  12.  
  13. listed = help.split()
  14. final = ""
  15.  
  16. for i in range (len(listed)):
  17. if listed[i] in keywords:
  18. final += listed[i] + " "
  19. print (final)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement