mirror of
https://github.com/Alvin-Zilverstand/ict-algemeen-opdrachten.git
synced 2026-03-06 21:29:36 +01:00
Refactor user prompts and remove unnecessary comments in string reversal and palindrome scripts
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
def is_palindrome(word):
|
||||
# Controleer of een woord een palindroom is
|
||||
return word == word[::-1]
|
||||
|
||||
# Vraag de gebruiker om een woord in te voeren
|
||||
|
||||
input_word = input("Voer een woord in: ")
|
||||
|
||||
# Controleer of het woord een palindroom is en geef het resultaat weer
|
||||
|
||||
if is_palindrome(input_word):
|
||||
print(f"{input_word} is een palindroom.")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user