🚀 Day 2 of #100DaysOfCode Today I learned how to check whether a number is a Palindrome using Python 🐍 🔍 Problem: A number is called a palindrome if it reads the same forward and backward (like 121, 1331). 💡 Approach: Reverse the number using a loop Compare it with the original number 🐍 Code: num = int(input("Enter a number: ")) original = num reverse = 0 while num > 0: digit = num % 10 reverse = reverse * 10 + digit num = num // 10 if original == reverse: print("Palindrome Number") else: print("Not a Palindrome Number") 📌 Key Learning: Learned how loops and basic logic can solve interesting problems. 💬 Next: Armstrong Number 🔥 #Python #Coding #100DaysOfCode #Learning #CSE
Palindrome Number Check in Python
More Relevant Posts
-
Can we actually enjoy studying? With the right approach, absolutely! 💡 I’ve been using a mix of my own notes and Generative AI to create visual summaries of Python basics. I found that using these visual "maps" makes it so much easier to remember terms properly for a long period of time. Whether you are a beginner or just need a quick revision guide, this 1-page summary is a game-changer for staying sharp. Check out my Python Basic "Cheat Sheet" below! 👇 #Python #GenAI #Programming #RevisionTips #CareerGrowth #DataScience #DataAnalytics
To view or add a comment, sign in
-
-
🚀 Day 5 – Exploring String Methods in Python Continuing my learning journey with @Global Quest Technologies! Today’s session focused on working with strings and their powerful built-in methods: 🔹 strip() and other essential string methods like split(), join(), replace() 🔹 Case conversion methods – upper(), lower(), swapcase(), title(), capitalize() 🔹 String checking methods – startswith(), endswith() 🔹 String formatting techniques 🔹 Program to accept a string and find its reverse These concepts are very useful for handling and manipulating text efficiently in Python. ✨ Each day brings new knowledge and skills! #Python #LearningJourney #Programming #Coding #Growth
To view or add a comment, sign in
-
-
Day 4 of learning Python Today I learned about TUPLES: Used to store multiple items in one variable Ordered & allow duplicate values Immutable (cannot change, add, or remove items) Key Concepts: Access items using indexing (positive & negative) Find length using len() Check item using "in" keyword Loop through tuple using for loop Important: To create a single item tuple → use comma Example: ("apple",) Workaround for updating tuple: Tuple → List → Modify → Convert back to Tuple Adding items: Tuples don’t support append(), but we can: Convert to list OR Add another tuple Practiced: Indexing Looping Checking elements Updating using workaround #Python #CodingJourney #100DaysOfCode #WomenInTech #LearnToCode
To view or add a comment, sign in
-
🚀 Day 5 — DSA with Python Solved the classic “Product of Array Except Self” problem today. This one introduced me to an important concept: 👉 Precomputation (Prefix & Suffix Pattern) Instead of recalculating products again and again, I learned how to: • Store prefix products (left side) • Store suffix products (right side) • Combine them to get the result efficiently 💡 Key Learning: Optimizing brute-force solutions using precomputation can significantly reduce time complexity. ⚡ What challenged me: Understanding how to manage two passes (left → right and right → left) without using extra space initially felt confusing — but breaking it step by step helped. 📈 Growth Insight: DSA is less about memorizing solutions and more about recognizing patterns like this one. On to Day 6 🔥 #DSA #Python #CodingJourney #ProblemSolving #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 10/30 – Python Challenge Learning about tuples in Python today! 🐍 🔹 Key Concepts Covered: * Creating tuples * Accessing elements using index * Iterating through tuple elements using loops * Understanding immutability (tuples cannot be changed) 💻 Mini Task: Created a tuple of numbers, accessed the first element, and used a loop to display all the values. 🎯 Learning Outcome: Understood how tuples are used to store fixed collections of data and how they differ from lists. They are especially useful when data should not be modified. Building a strong foundation in data structures step by step 💪 #Python #CodingChallenge #LearningJourney #DataStructures #StudentDeveloper #Day10
To view or add a comment, sign in
-
-
Day 3 of learning Python. Didn’t jump into anything complex… just focused on understanding input and output properly. At first it looked very simple — input() and print() — but when I actually tried small programs, I realized how important this is. Especially the part where Python takes everything as string by default and we need to convert it using int() or float(). Tried a few basic programs like taking numbers from user and printing the sum. Small thing, but felt good seeing it work. Feels like I’m finally building the base properly instead of rushing. Next step → learning conditions (if-else) and writing better logic. #Python #Learning #DevOpsJourney
To view or add a comment, sign in
-
-
Excited to Share My New Python Library: 𝗽𝘆𝗶𝗺𝗴𝟮𝗮𝘀𝗰𝗶𝗶 I just released 𝘃𝟬.𝟱 of pyimg2ascii, a Python library I built to convert images into ASCII art. I created it to experiment with image processing and make coding a bit more fun and creative. 1. 𝗽𝗶𝗽 𝗶𝗻𝘀𝘁𝗮𝗹𝗹 𝗽𝘆𝗶𝗺𝗴𝟮𝗮𝘀𝗰𝗶𝗶 You can try it yourself and see your images come alive as ASCII art! I’d love to hear your feedback and see what you create. Check it out here: https://lnkd.in/g86iPSU4 #Python
To view or add a comment, sign in
-
-
🐍 Day 22 of My 30-Day Python Learning Challenge Today I improved my Log File Analyzer by allowing user input (file name) instead of hardcoding. 📌 Code: filename = input("Enter file name: ") with open(filename, "r") as file: content = file.read().lower() print(content[:100]) # preview first 100 characters 📌 Why this matters? • Makes the program flexible • Works with any file • Closer to real-world usage 📊 Quick Question What happens if the user enters a wrong file name? A) Program crashes B) Empty output C) None D) Skips execution Answer tomorrow 👇 #Python #MiniProject #UserInput #LearningInPublic #SoftwareDeveloper
To view or add a comment, sign in
-
Hello everybody, and welcome to this second personal project of 'Learning Python with me'. Today, I have been asked to create a commission calculator for a friend, and we will use Python to make a simple calculator that shows the percentage commission. What do we need? - Name - Income - Commission result Throughout this project, I realized that I needed to convert strings into integers, since the final result had to be a number. I also learned how to use variables in mathematical operations and print them as a final result. Here is how it looks. I hope you enjoy it! :) #Python #PythonProject #SideProject #fyp #Programming #OpsDeveloper
To view or add a comment, sign in
-
Python Clarity Series – Episode 25 Topic: Mutable vs Immutable Function Behavior 📌 Why did my list change after function call? def modify(lst): lst.append(100) a = [1, 2] modify(a) print(a) Output: [1, 2, 100] 👉 Lists are mutable → changes reflect outside Now: def modify(x): x = x + 10 a = 5 modify(a) print(a) Output: 5 👉 Integers are immutable → no change outside 💡 Rule: Mutable → changes persist Immutable → changes don’t This confusion causes logic errors. #PythonBasics #FunctionConcepts #StudentClarity #python #clarity
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development