Day 8 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to check whether a number is a palindrome without converting it into a string. A palindrome number is a number that reads the same forward and backward. What the program does: • Takes an integer input from the user • Reverses the number using mathematical operations • Compares the reversed number with the original number • Determines whether the number is a palindrome How the logic works: The original number is stored in a variable for later comparison A variable is initialized to store the reversed number Using a while loop, the last digit is extracted using modulo (n % 10) The digit is added to the reversed number after shifting its place value The number is reduced using integer division (n // 10) Finally, the original number is compared with the reversed number Examples: 1)Input: 12321 Output: 12321 is a palindrome 2)Input: 180018 Output: 180018 is not a palindrome Key learnings from Day 8: – Using modulo and integer division effectively – Reversing numbers without string conversion – Strengthening loop and arithmetic logic – Writing efficient and clean Python code #100DaysOfCodeChallenge #Day8 #PythonLearning #CorePython #LogicBuilding #ProgrammingBasics #DSAinPython #AlgorithmicThinking #CodingDaily #LearnByDoing #StudentCoder #FutureSoftwareEngineer #TechSkills #ComputerScience #VITBhopal #CSEStudent #AIandML
SATISH KUMAR’s Post
More Relevant Posts
-
Day 16 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to print a diamond pattern using stars (*). The goal was to understand nested loops, pattern logic, and spacing techniques in Python. What the program does: • Takes the number of rows as input • Prints the upper half of the diamond • Prints the lower half of the diamond • Uses spaces and stars to create a symmetric pattern How the logic works: 1)A function print_diamond(n) is defined 2)The first for loop prints the upper part of the diamond – Spaces are printed using ' ' * (n - i - 1) – Stars are printed using '*' * (2 * i + 1) 3)The second for loop prints the lower part – It runs in reverse order – The same spacing and star logic is applied Key learnings from Day 16: – Understanding pattern-based logic – Working with nested loops – Controlling spacing and alignment – Strengthening logical thinking #100DaysOfCode #Day16 #Python #PythonProgramming #PatternProgramming #LogicBuilding #CodingPractice #ProblemSolving #LearnByDoing #ComputerScience #BTech #CSE #AIandML #VITBhopal #TechJourney
To view or add a comment, sign in
-
-
Day 17 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to count the number of vowels and consonants in a given string. The goal was to practice string traversal and character classification. What the program does: • Takes a string input from the user • Converts the string to lowercase for consistency • Checks each character individually • Counts vowels and consonants separately • Returns both counts How the logic works: A function count_vowels_consonants(string) is defined Two strings are created: – One containing all vowels (aeiou) – One containing all consonants Two counters are initialized to 0 The program loops through each character in the string If the character is in the vowel string, vowel count increases If the character is in the consonant string, consonant count increases The function returns both counts Example: Input: my name is SATISH KUMAR Output: Vowels: 7 Consonants: 12 Key learnings from Day 17: – Iterating through strings – Using conditional statements effectively – Handling case sensitivity with .lower() – Strengthening basic string manipulation skills #100DaysOfCode #Day17 #Python #PythonProgramming #StringManipulation #ProblemSolving #CodingPractice #LogicBuilding #LearnByDoing #ComputerScience #BTech #CSE #AIandML #VITBhopal #TechJourney
To view or add a comment, sign in
-
-
🚀 Excited to share my latest technical blog: Building a Mini Student Management System Using Lists and Dictionaries in Python In this article, I explain how basic Python data structures can be used to implement CRUD operations and build a simple real-world application. This project demonstrates how lists and dictionaries work together to manage structured student records efficiently and forms the foundation for larger database-driven systems. 📖 Read the full blog here: [https://lnkd.in/d9pEmZ3D] Special thanks to Innomatics Research Labs for the learning opportunity and guidance. #Python #DataStructures #PythonProjects #Programming #StudentManagementSystem #CodingJourney #InnomaticsResearchLabs
To view or add a comment, sign in
-
Day 14 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to find the common elements between two lists using sets. The goal was to solve the problem efficiently without using nested loops. What the program does: • Takes two lists as input • Converts both lists into sets • Uses set intersection to find common elements • Converts the result back into a list • Prints the common elements How the logic works: Two lists are defined with numeric values Both lists are converted into sets using set() The intersection operator & is used to find common elements The resulting set is converted back into a list The final list of common elements is displayed Example: List 1:[1, 2, 3, 4, 5] List 2:[4, 5, 6, 7, 8] Output: Common elements:[4, 5] Key learnings from Day 14: – Understanding set operations in Python – Using intersection (&) efficiently – Avoiding nested loops for better performance – Writing clean and optimized code #100DaysOfCode #Day14 #Python #PythonProgramming #SetOperations #DataStructures #ProblemSolving #CodingPractice #LearnByDoing #ComputerScience #BTech #CSE #AIandML #VITBhopal #TechJourney
To view or add a comment, sign in
-
-
Day 12 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to convert a decimal number into its binary representation without using built-in functions like bin(). The goal was to understand how number base conversion works internally. What the program does: • Takes a decimal number as input • Uses division and modulo operations • Builds the binary representation manually • Returns the final binary number as a string How the logic works: An empty string binary is initialized to store the result A while loop runs as long as the number is greater than 0 The remainder when dividing by 2 (n % 2) is calculated The remainder is added to the front of the binary string The number is reduced using integer division (n // 2) The loop continues until the number becomes 0 The final binary string is returned Example: Input - 34 Output - Binary representation of 34 is: 100010 Key learnings from Day 12: – Understanding number system conversion – Using modulo and integer division effectively – Building logic step-by-step without built-in shortcuts – Strengthening fundamental programming concepts #100DaysOfCode #Day12 #Python #PythonProgramming #NumberSystems #BinaryConversion #ProblemSolving #CodingPractice #LearnByDoing #ComputerScience #BTech #CSE #AIandML #VITBhopal #TechJourney
To view or add a comment, sign in
-
-
🚀 DSA 150 – Day 1 🧩 Leet code 217: Contains Duplicate Today I solved Contains Duplicate using Python. 🔎 Problem Summary: Given an integer array of nums, return True if any value appears at least twice, otherwise return False. 📚 Topics Covered: Arrays HashSet (using Python set) 💡 Key Learning: Instead of using nested loops (O(n²)), I used a HashSet to track seen elements while iterating once through the array. This reduced the time complexity to O(n) with O(n) space. Every small step builds stronger fundamentals. On to Day 1 💪🔥 #DSA #Python #Leet code #Problem solving #Coding journey
To view or add a comment, sign in
-
-
🚀 Day 16/30 – List Comprehension & Generators Today I learned how to write cleaner and more efficient Python code. 📌 List Comprehension A shorter way to create lists using a single line. Python Copy code squares = [x*x for x in range(1,6)] print(squares) 📌 Generators Use yield to generate values one by one instead of storing everything in memory. 💡 Key Takeaway: List comprehension improves code readability, while generators improve memory efficiency. Day 16 complete ✅ #Python #30DaysChallenge #LearningInPublic #ProgrammingJourney #Consistency Aditya Chaturvedi JECRC University
To view or add a comment, sign in
-
-
💻 Typing Speed Test Game using Python As part of my learning journey with InternPe, I created a Typing Speed Test application using Python and Tkinter. The application displays a random sentence and measures how fast the user types it. Based on the typing time and number of words, the program calculates the typing speed in Words Per Minute (WPM). ✨ Key Learnings from this project: • GUI development with Tkinter • Working with Python libraries like random and time • Implementing typing speed calculation logic Projects like this help convert theoretical knowledge into practical skills. #PythonProgramming #Tkinter #Coding #SoftwareDevelopment #PythonProjects #InternPe
To view or add a comment, sign in
-
Day 10 of my #100DaysOfCode challenge 🚀 Today I worked on a Python program to merge two sorted lists into a single sorted list. The goal was to combine both lists efficiently while maintaining the sorted order — similar to the merging step in Merge Sort. What the program does: • Takes two already sorted lists as input • Compares elements from both lists one by one • Adds the smaller element to a new list • Appends any remaining elements after comparison • Returns the final merged sorted list How the logic works: Two pointers (i and j) are initialized to track positions in both lists A while loop runs until one of the lists is fully traversed The elements at index i and j are compared The smaller element is added to the merged list The corresponding pointer is incremented After the loop, any remaining elements from either list are appended using extend() Example: List 1: [1, 3, 5, 7] List 2: [2, 4, 6, 8] Output: Merged sorted list: [1, 2, 3, 4, 5, 6, 7, 8] Key learnings from Day 10: – Understanding the two-pointer technique – Applying comparison-based logic efficiently – Learning the core idea behind Merge Sort – Writing clean and structured functions #100DaysOfCode #Day10 #Python #PythonProgramming #DataStructures #Algorithms #TwoPointerTechnique #CodingPractice #LearningInPublic #ComputerScience #BTech #CSE #AIandML #VITBhopal #TechJourney
To view or add a comment, sign in
-
-
I’ve published a new learning tool on Hog Wild Coding: Python Flashcards — covering fundamentals through NumPy and pandas. Designed for quick repetition and concept reinforcement, it includes: • Study mode (flip + shuffle) • Exam mode (type → reveal → self-grade) • 100 core Q/A concepts across Python and common libraries Explore it here: https://lnkd.in/gMrfegHG I’m continuing to build structured learning tools focused on software engineering and AI pathways. Feedback is welcome. #Python #SoftwareEngineering #DataAnalytics #ContinuousLearning #WGU #Pandas #NumPy
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