Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5496b2a

Browse files
Updated Python Projects with a new beginner project.
1 parent 2532b85 commit 5496b2a

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

‎Beginner/6_palindrome_checker.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
word = input("What is the word you want to check?: ")
2+
3+
word = word.lower()
4+
5+
if word == word[::-1]:
6+
print(f"'{word}' is a palindrome")
7+
else:
8+
print(f"'{word}' is not a palindrome")

‎README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,36 @@ These projects are ideal for those new to Python. Each project includes a descri
187187

188188
</details>
189189

190+
### 6. Palindrome Checker
191+
- **Description**: Build a simple palindrome checker.
192+
193+
- **Solution**: https://github.com/Infinitode/Python-Projects/blob/main/Beginner/6_palindrome_checker.py
194+
195+
- **Steps**:
196+
1. Prompt the user for a word.
197+
2. Reverse the string.
198+
3. Check if it is equal to the original.
199+
4. Display the result.
200+
201+
- **Tips:**
202+
203+
</summary>
204+
<details><summary>Tip 1:</summary>
205+
206+
Use `input()` for input.
207+
208+
</details>
209+
<details><summary>Tip 2:</summary>
210+
211+
You can easily reverse the string using array manipulation techniques. `[::-1]`
212+
213+
</details>
214+
<details><summary>Tip 3:</summary>
215+
216+
Print out the result using `print()`.
217+
218+
</details>
219+
190220
> [!NOTE]
191221
> Working code solutions are in the `/Beginner` folder.
192222

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /