Advertisement
go6odn28

03. Wolf In Sheep's Clothing

Apr 10th, 2024
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 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. else:
  6.     for index in range(len(animals)):
  7.         if animals[index] == 'wolf':
  8.             sheep_index = len(animals) - index - 1
  9.             break
  10.     print(f"Oi! Sheep number {sheep_index}! You are about to be eaten by a wolf!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement