Advertisement
richwhilecooper

My First Class

Nov 13th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. ###knock knock joke
  2. class Joke:
  3.     i1 = "Knock knock"
  4.     i2 = "Who's there?"
  5.     def __init__(self, door, punch):
  6.         self.d = door
  7.         self.p = punch
  8.  
  9. first = "Atch"
  10. second = "What a tertible cold - can I come in?"
  11.  
  12. def tell(first,second):
  13.     joke = Joke(first,second)
  14.     print (joke.i1)
  15.     print (joke.i2)
  16.     print (joke.d)
  17.     print (joke.d + " who?")
  18.     print (joke.p)
  19.  
  20. tell(first,second)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement