GeorgiLukanov87

wolf_sheeps

May 30th, 2022 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. animals = input().split(", ")
  2.  
  3. if animals[-1] == 'wolf':
  4.     print("Please go away and stop eating my sheep")
  5.     (exit())
  6. counter = -1
  7. for wolf in range(len(animals)-1, -1, -1):
  8.     counter += 1
  9.     if animals[wolf] == 'wolf':
  10.         print(f"Oi! Sheep number {counter}! You are about to be eaten by a wolf!")
Add Comment
Please, Sign In to add comment