-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db6591f
commit f50952e
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |