viligen

wolf_sheeps

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