Skip to content
Open
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
7e64213
[Sync Iteration] python/hello-world/1
exercism-solutions-syncer[bot] Aug 15, 2025
cb2e0e3
[Sync Iteration] python/armstrong-numbers/1
exercism-solutions-syncer[bot] Aug 15, 2025
ff43466
[Sync Iteration] python/matrix/1
exercism-solutions-syncer[bot] Aug 15, 2025
52e18ab
[Sync Iteration] python/matrix/2
exercism-solutions-syncer[bot] Aug 15, 2025
079e739
[Sync Iteration] python/matrix/3
exercism-solutions-syncer[bot] Aug 15, 2025
fc88f8a
[Sync Iteration] python/matrix/4
exercism-solutions-syncer[bot] Aug 15, 2025
b521ba4
[Sync Iteration] python/two-fer/1
exercism-solutions-syncer[bot] Aug 15, 2025
5855f05
[Sync Iteration] python/two-fer/2
exercism-solutions-syncer[bot] Aug 15, 2025
28a2d3e
[Sync Iteration] python/raindrops/1
exercism-solutions-syncer[bot] Aug 15, 2025
16dfe77
[Sync Iteration] python/raindrops/2
exercism-solutions-syncer[bot] Aug 15, 2025
02c9816
[Sync Iteration] python/raindrops/3
exercism-solutions-syncer[bot] Aug 15, 2025
56f4cfe
[Sync Iteration] python/raindrops/4
exercism-solutions-syncer[bot] Aug 15, 2025
cfe664d
[Sync Iteration] python/high-scores/1
exercism-solutions-syncer[bot] Aug 15, 2025
f4356be
[Sync Iteration] python/little-sisters-vocab/1
exercism-solutions-syncer[bot] Aug 15, 2025
cb0c89b
[Sync Iteration] python/little-sisters-vocab/2
exercism-solutions-syncer[bot] Aug 15, 2025
120f2c1
[Sync Iteration] python/little-sisters-vocab/3
exercism-solutions-syncer[bot] Aug 15, 2025
497861e
[Sync Iteration] python/little-sisters-vocab/4
exercism-solutions-syncer[bot] Aug 15, 2025
559fea9
[Sync Iteration] python/little-sisters-vocab/5
exercism-solutions-syncer[bot] Aug 15, 2025
d886cda
[Sync Iteration] python/little-sisters-vocab/6
exercism-solutions-syncer[bot] Aug 15, 2025
9623271
[Sync Iteration] python/little-sisters-vocab/7
exercism-solutions-syncer[bot] Aug 15, 2025
c4d3bc8
[Sync Iteration] python/little-sisters-vocab/8
exercism-solutions-syncer[bot] Aug 15, 2025
9191a67
[Sync Iteration] python/meltdown-mitigation/1
exercism-solutions-syncer[bot] Aug 15, 2025
36c9309
[Sync Iteration] python/meltdown-mitigation/2
exercism-solutions-syncer[bot] Aug 15, 2025
28db9e9
[Sync Iteration] python/tisbury-treasure-hunt/1
exercism-solutions-syncer[bot] Aug 15, 2025
44d6e11
[Sync Iteration] python/tisbury-treasure-hunt/2
exercism-solutions-syncer[bot] Aug 15, 2025
16711a0
[Sync Iteration] python/tisbury-treasure-hunt/3
exercism-solutions-syncer[bot] Aug 15, 2025
b024f42
[Sync Iteration] python/tisbury-treasure-hunt/4
exercism-solutions-syncer[bot] Aug 15, 2025
c41d793
[Sync Iteration] python/tisbury-treasure-hunt/5
exercism-solutions-syncer[bot] Aug 15, 2025
9f4e269
[Sync Iteration] python/guidos-gorgeous-lasagna/1
exercism-solutions-syncer[bot] Aug 15, 2025
d09f718
[Sync Iteration] python/guidos-gorgeous-lasagna/2
exercism-solutions-syncer[bot] Aug 15, 2025
65a1046
[Sync Iteration] python/guidos-gorgeous-lasagna/3
exercism-solutions-syncer[bot] Aug 15, 2025
d5bcf97
[Sync Iteration] python/guidos-gorgeous-lasagna/4
exercism-solutions-syncer[bot] Aug 15, 2025
427158c
[Sync Iteration] python/guidos-gorgeous-lasagna/5
exercism-solutions-syncer[bot] Aug 15, 2025
87369a9
[Sync Iteration] python/guidos-gorgeous-lasagna/6
exercism-solutions-syncer[bot] Aug 15, 2025
ca55445
[Sync Iteration] python/guidos-gorgeous-lasagna/7
exercism-solutions-syncer[bot] Aug 15, 2025
60c8d2c
[Sync Iteration] python/ghost-gobble-arcade-game/1
exercism-solutions-syncer[bot] Aug 15, 2025
14e8f63
[Sync Iteration] python/ghost-gobble-arcade-game/2
exercism-solutions-syncer[bot] Aug 15, 2025
0e66f06
[Sync Iteration] python/ghost-gobble-arcade-game/3
exercism-solutions-syncer[bot] Aug 15, 2025
7cdd5c2
[Sync Iteration] python/ghost-gobble-arcade-game/4
exercism-solutions-syncer[bot] Aug 15, 2025
97f6792
[Sync Iteration] python/ghost-gobble-arcade-game/5
exercism-solutions-syncer[bot] Aug 15, 2025
22cf923
[Sync Iteration] python/ghost-gobble-arcade-game/6
exercism-solutions-syncer[bot] Aug 15, 2025
6967d82
[Sync Iteration] python/black-jack/1
exercism-solutions-syncer[bot] Aug 15, 2025
349db07
[Sync Iteration] python/black-jack/2
exercism-solutions-syncer[bot] Aug 15, 2025
bc6d700
[Sync Iteration] python/black-jack/3
exercism-solutions-syncer[bot] Aug 15, 2025
6447a5c
[Sync Iteration] python/black-jack/4
exercism-solutions-syncer[bot] Aug 15, 2025
2ebcb0d
[Sync Iteration] python/black-jack/5
exercism-solutions-syncer[bot] Aug 15, 2025
7da1bf7
[Sync Iteration] python/black-jack/6
exercism-solutions-syncer[bot] Aug 15, 2025
f413dfc
[Sync Iteration] python/black-jack/7
exercism-solutions-syncer[bot] Aug 15, 2025
1130c44
[Sync Iteration] python/black-jack/8
exercism-solutions-syncer[bot] Aug 15, 2025
b011fed
[Sync Iteration] python/inventory-management/1
exercism-solutions-syncer[bot] Aug 15, 2025
f2c10c0
[Sync Iteration] python/card-games/1
exercism-solutions-syncer[bot] Aug 15, 2025
249c8e9
[Sync Iteration] python/card-games/2
exercism-solutions-syncer[bot] Aug 15, 2025
1bb6676
[Sync Iteration] python/card-games/3
exercism-solutions-syncer[bot] Aug 15, 2025
843aa2d
[Sync Iteration] python/card-games/4
exercism-solutions-syncer[bot] Aug 15, 2025
ec80803
[Sync Iteration] python/card-games/5
exercism-solutions-syncer[bot] Aug 15, 2025
6b05e47
[Sync Iteration] python/chaitanas-colossal-coaster/1
exercism-solutions-syncer[bot] Aug 15, 2025
7329290
[Sync Iteration] python/chaitanas-colossal-coaster/2
exercism-solutions-syncer[bot] Aug 15, 2025
712e0d3
[Sync Iteration] python/making-the-grade/1
exercism-solutions-syncer[bot] Aug 15, 2025
7037a8a
[Sync Iteration] python/making-the-grade/2
exercism-solutions-syncer[bot] Aug 15, 2025
5c8d0bf
[Sync Iteration] python/making-the-grade/3
exercism-solutions-syncer[bot] Aug 15, 2025
518f496
[Sync Iteration] python/making-the-grade/4
exercism-solutions-syncer[bot] Aug 15, 2025
392925c
[Sync Iteration] python/making-the-grade/5
exercism-solutions-syncer[bot] Aug 15, 2025
6d543aa
[Sync Iteration] python/making-the-grade/6
exercism-solutions-syncer[bot] Aug 15, 2025
97907e6
[Sync Iteration] python/little-sisters-essay/1
exercism-solutions-syncer[bot] Aug 15, 2025
3097c83
[Sync Iteration] python/little-sisters-essay/2
exercism-solutions-syncer[bot] Aug 15, 2025
0226113
[Sync Iteration] python/little-sisters-essay/3
exercism-solutions-syncer[bot] Aug 15, 2025
163bb78
[Sync Iteration] python/currency-exchange/1
exercism-solutions-syncer[bot] Aug 15, 2025
23e83d7
[Sync Iteration] python/currency-exchange/2
exercism-solutions-syncer[bot] Aug 15, 2025
e5573c7
[Sync Iteration] python/cater-waiter/1
exercism-solutions-syncer[bot] Aug 15, 2025
6015c3f
[Sync Iteration] python/cater-waiter/2
exercism-solutions-syncer[bot] Aug 15, 2025
9afca83
[Sync Iteration] python/cater-waiter/3
exercism-solutions-syncer[bot] Aug 15, 2025
1ecb97c
[Sync Iteration] python/locomotive-engineer/1
exercism-solutions-syncer[bot] Aug 15, 2025
c360aab
[Sync Iteration] go/hello-world/1
exercism-solutions-syncer[bot] Aug 15, 2025
1c9a40c
[Sync Iteration] go/lasagna/1
exercism-solutions-syncer[bot] Aug 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Sync Iteration] python/little-sisters-vocab/8
  • Loading branch information
exercism-solutions-syncer[bot] committed Aug 15, 2025
commit c4d3bc8eaa55d0ad604ac365c82d5dbaf935db7a
74 changes: 74 additions & 0 deletions solutions/python/little-sisters-vocab/8/strings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
""" Little Sister's Vocabulary """

def add_prefix_un(word):
"""

:param word: str of a root word
:return: str of root word with un prefix

This function takes `word` as a parameter and
returns a new word with an 'un' prefix.
"""

return "un" + word


def make_word_groups(vocab_words):
"""

:param vocab_words: list of vocabulary words with a prefix.
:return: str of prefix followed by vocabulary words with
prefix applied, separated by ' :: '.

This function takes a `vocab_words` list and returns a string
with the prefix and the words with prefix applied, separated
by ' :: '.
"""

prefix = vocab_words[0]
words = vocab_words[1:]
prefix_group = [prefix]
for word in words:
new_word = prefix + word
prefix_group.append(new_word)
result = " :: ".join(prefix_group)
return result


def remove_suffix_ness(word):
"""

:param word: str of word to remove suffix from.
:return: str of word with suffix removed & spelling adjusted.

This function takes in a word and returns the base word with `ness` removed.
"""

word = word.rstrip("ness")
lettres = list(word)
voyelles = ['a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', '0', 'U', 'Y']
for voyelle in voyelles:
if (lettres[-1] == 'i') & (lettres[-2] != voyelle):
lettres[-1] = "y"
word = "".join(lettres)
return word


def noun_to_verb(sentence, index):
"""

:param sentence: str that uses the word in sentence
:param index: index of the word to remove and transform
:return: str word that changes the extracted adjective to a verb.

A function takes a `sentence` using the
vocabulary word, and the `index` of the word once that sentence
is split apart. The function should return the extracted
adjective as a verb.
"""

words = sentence.split()
word = words[index]
if index == -1:
word = word.strip(".")
return word + 'en'