dailyprogrammer 391

This commit is contained in:
newt 2024-10-09 18:02:30 +01:00
parent 96fcc4ab8b
commit 853618c8bb
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)
- #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
- [Solution](%23393%20-%20Making%20Change.py)
- [Reddit Post](https://www.reddit.com/r/dailyprogrammer/comments/nucsik/20210607_challenge_393_easy_making_change/)