Guest User

Untitled

a guest
Oct 20th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. def AI():
  2. names = open("\\ph-fss1\Students\S39055\Desktop\names.txt","w")
  3. name = raw_input("Hello and welcome to the Creative, Orginal, Reactive, A.I, Cora. What is your name? ")
  4. file.read(names)
  5. if name in names:
  6. print "Welcome back " + name
  7. if name not in names:
  8. print "You are a new user would you like to me to remember your name?"
  9. name_yes = raw_input("Yes/No: ").lower()
  10. if name_yes == "yes":
  11. file.wright(name)
  12. file.close()
Add Comment
Please, Sign In to add comment