Advertisement
Osiris1002

Wolf In Sheep's Clothing

Apr 10th, 2024
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. text = input()
  2.  
  3. check_for_wolf = text.split(", ")
  4. check_for_number = len(check_for_wolf) - 1
  5.  
  6. for wolf in check_for_wolf:
  7.  
  8.     if wolf == "wolf" and check_for_number == 0:
  9.         text_to_print = "Please go away and stop eating my sheep"
  10.  
  11.     elif wolf == "wolf":
  12.         text_to_print = f"Oi! Sheep number {check_for_number}! You are about to be eaten by a wolf!"
  13.  
  14.     check_for_number -= 1
  15.  
  16. print(text_to_print)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement