Advertisement
kevinbocky

character_test.py

Jan 18th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. class Character:
  2.  
  3.  
  4. def __init__ (self, char_name, char_description):
  5. self.name = char_name
  6. self.description = char_description
  7. self.conversation = None
  8.  
  9. def describe(self):
  10. print(self.name + " is here! ")
  11. print(self.description)
  12.  
  13.  
  14. def talk(self):
  15.  
  16. for loop in range(1):
  17. print("Hi i'm Dave")
  18. question1 = input("How are you? ")
  19. if question1 == "Good" or question1 == "good":
  20. print("OK nice")
  21. elif question1 == "Bad" or question1 == "bad":
  22. print("I'm sorry to hear that")
  23. else:
  24. print("I'm sorry i don't understand")
  25. -------------------------------------------------------
  26.  
  27. from character import Character
  28.  
  29. dave = Character("Dave", "A smelly zombie")
  30.  
  31. dave.describe()
  32. dave.talk()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement