Advertisement
3th1ca14aX0r

Untitled

Jun 21st, 2024
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.82 KB | Jokes | 0 0
  1. class KravMaga:
  2.     def __init__(self, practitioner_name):
  3.         self.practitioner_name = practitioner_name
  4.  
  5.     def perform_move(self, move):
  6.         return f"{self.practitioner_name} performs a {move} with the finesse of a ninja and the intensity of a coffee-fueled coder!"
  7.  
  8. def krav_maga_joke():
  9.     practitioner = KravMaga("Joseph Jewell")
  10.     moves = ["punch", "kick", "block", "escape maneuver"]
  11.  
  12.     joke = f"Why did the programmer start learning Krav Maga?\n"
  13.     joke += f"Because {practitioner.practitioner_name} wanted to master both code and combat!\n"
  14.  
  15.     for move in moves:
  16.         joke += practitioner.perform_move(move) + "\n"
  17.  
  18.     joke += "Remember: In coding and in Krav Maga, always expect the unexpected errors and opponents!"
  19.     return joke
  20.  
  21. if __name__ == "__main__":
  22.     print(krav_maga_joke())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement