Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanBaird authored Jun 18, 2022
1 parent db6591f commit f50952e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions If_you_can't_sleep_just_count_sheep_kyu8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# # that counts "n" amount of sheeps
# various variables for later use
# While loop that appends (str(amount) + " sheep...") to the list sheep
# Adding to count and amount
# Returning the list in a joined string state

def count_sheep(n):
count = 0
amount = 1
sheep = []
while count < n:
sheep.append(str(amount) + " sheep...")
count += 1
amount += 1
return ''.join(sheep)

0 comments on commit f50952e

Please sign in to comment.