dailyprogrammer 391

This commit is contained in:
newt 2021-07-20 20:41:52 +01:00
parent bca5ddd964
commit d23a41f711
No known key found for this signature in database
GPG key ID: A0D2776505CA4B20
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,14 @@
from string import ascii_lowercase
def abacaba(n):
output = ''
currLetter = 0
for i in range(n):
output = '{0}{1}{2}'.format(output, ascii_lowercase[currLetter], output)
currLetter = currLetter + 1
if currLetter > 25:
currLetter = 0
return output
out = abacaba(10)
print(out)

View file

@ -5,6 +5,9 @@
[The Subreddit](https://reddit.com/r/dailyprogrammer) [The Subreddit](https://reddit.com/r/dailyprogrammer)
- #391 - ABACABA
- [Solution](%23391%20-%20ABACABA.py)
- [Reddit Post](https://www.reddit.com/r/dailyprogrammer/comments/njxq95/20210524_challenge_391_easy_the_abacaba_sequence/)
- #393 - Making Change - #393 - Making Change
- [Solution](%23393%20-%20Making%20Change.py) - [Solution](%23393%20-%20Making%20Change.py)
- [Reddit Post](https://www.reddit.com/r/dailyprogrammer/comments/nucsik/20210607_challenge_393_easy_making_change/) - [Reddit Post](https://www.reddit.com/r/dailyprogrammer/comments/nucsik/20210607_challenge_393_easy_making_change/)