Advertisement
go6odn28

3_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.51 KB | None | 0 0
  1. # 1
  2. queue = input().split(', ')
  3.  
  4. if queue[-1] == 'wolf':
  5.     print("Please go away and stop eating my sheep")
  6. else:
  7.     wolf_position = queue.index('wolf')
  8.     sheep_number = len(queue) - wolf_position - 1
  9.     print(f"Oi! Sheep number {sheep_number}! You are about to be eaten by a wolf!")
  10.  
  11.  
  12.  
  13. # 2
  14. queue = input().split(', ')
  15. print("Please go away and stop eating my sheep") if queue[-1] == 'wolf' else print(f"Oi! Sheep number {len(queue) - queue.index('wolf') - 1}! You are about to be eaten by a wolf!")
  16.  
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement