Advertisement
bl00dt3ars

03. Wolf In Sheep's Clothing

May 22nd, 2021
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. string = input().split(", ")
  2.  
  3. if string[-1] == "wolf":
  4.     print("Please go away and stop eating my sheep")
  5. else:
  6.     sheep_counter = 0
  7.     for i in range(len(string)-1, -1, -1):
  8.         if string[i] == "sheep":
  9.             sheep_counter += 1
  10.         else:
  11.             break
  12.     print(f"Oi! Sheep number {sheep_counter}! You are about to be eaten by a wolf!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement