Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class KravMaga:
- def __init__(self, practitioner_name):
- self.practitioner_name = practitioner_name
- def perform_move(self, move):
- return f"{self.practitioner_name} performs a {move} with the finesse of a ninja and the intensity of a coffee-fueled coder!"
- def krav_maga_joke():
- practitioner = KravMaga("Joseph Jewell")
- moves = ["punch", "kick", "block", "escape maneuver"]
- joke = f"Why did the programmer start learning Krav Maga?\n"
- joke += f"Because {practitioner.practitioner_name} wanted to master both code and combat!\n"
- for move in moves:
- joke += practitioner.perform_move(move) + "\n"
- joke += "Remember: In coding and in Krav Maga, always expect the unexpected errors and opponents!"
- return joke
- if __name__ == "__main__":
- print(krav_maga_joke())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement