SimeonTs

SUPyF2 Basic Exercise - 05. Can't Sleep? Count Sheep

Sep 24th, 2019
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. """
  2. Basic Syntax, Conditional Statements and Loops - Exercise
  3. Check your code: https://judge.softuni.bg/Contests/Compete/Index/1719#4
  4. Video: https://www.youtube.com/watch?time_continue=4&v=7sHE4HEUqi8
  5.  
  6. SUPyF2 Basic Exercise - 05. Can't Sleep? Count Sheep
  7.  
  8. Problem:
  9. If you can't sleep, just count sheep! Given a non-negative integer, 3 for example, return a string with a murmur:
  10. "1 sheep...2 sheep...3 sheep..." Input will always be valid, i.e. no negative integers.
  11. """
  12. how_many_sheep = int(input())
  13.  
  14. for sheep in range(how_many_sheep):
  15.     print(f"{sheep + 1} sheep...", end="")
Add Comment
Please, Sign In to add comment