mirror of
https://github.com/Alvin-Zilverstand/ict-algemeen-opdrachten.git
synced 2026-11-27 00:23:02 +01:00
Refactor user prompts and remove unnecessary comments in string reversal and palindrome scripts
This commit is contained in:
1 parent
d5155c48b3
commit
aecf610e9c
2 files changed
+4
-6
No files matched your search
@@ -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