🚀 Learning Python – Multiplication Table Program 1.Today I practiced a simple Python program to print the multiplication table of a number. Here’s the code 👇 n = 10 for i in range(1, 11): print(n, '*', i, '=', (n * i)) ✅ Output: 10 * 1 = 10 10 * 2 = 20 10 * 3 = 30 10 * 4 = 40 10 * 5 = 50 10 * 6 = 60 10 * 7 = 70 10 * 8 = 80 10 * 9 = 90 10 * 10 = 100 🚀 Learning Python – Even/Odd & Number Check 2.Today I worked on a simple Python program to check whether a number is positive, negative, or zero. Here’s the code 👇 n = 10 if n % 2 == 0: print('The positive number:', n) elif n == 0: print('The negative number:', n) else: print('zero') ✅ Output: The positive number: 10
Python Multiplication Table Program
More Relevant Posts
-
🧑💻 Day 107 of My Python Learning 💡 “Strong basics make advanced topics easier.” 📌 Today I revised Regular Expressions (Regex) along with Raw Strings because new topics are getting added on top of this. 🔹 Introduction to Regular Expressions Regular Expressions (Regex) are used to search, match, and extract patterns from text. Instead of checking text manually, we write a pattern. Examples: -Find all numbers in a string -Check if an email format is valid -Extract specific words from a sentence 🔹 Raw Strings in Python When writing Regex in Python, we use raw strings by adding r before the string. Example: r"\n" Because Python normally treats \n as a newline, but in Regex, we want \ as it is. 🔹 Simple Understanding Without raw string: "\d" → Python may misinterpret With raw string: r"\d" → Correct Regex for digits 📌 Reference to today's learning: GitHub https://lnkd.in/dpsYcsH7
To view or add a comment, sign in
-
These are my actual Python notes. 🠀 Written by hand. Messy in places. Some mistakes crossed out. Some pages have arrows going in every direction. 4 months of sitting with this every day. No shortcut. No expensive bootcamp. Just a notebook, a pen, and YouTube. People ask me: why write by hand when you can just type? Because when I write it, I remember it. When I type it, I forget it. This is what self - learning actually looks like. Not perfect. Just consistent. 🠀 Topics c overed in these notes: → print() and input() → Variables and Data Types → Operators → Loops and Conditionals → Functions, OOPs, File Handling Are you also learning Python? Drop a 🠀 below.
To view or add a comment, sign in
-
🚀 Python Learning Series – 2: Variables, Data Types & Operators 🐍💻 After understanding the basics of Python in Series 1, the next important step is mastering Series 2, because this is the foundation of writing real programs. 📌 In Series 2, we learn: ✅ 🔹 Variables Variables are used to store values in memory. Example: name = "ABC" age = 25 ✅ 🔹 Rules of Variable Naming ✔ Must start with a letter or underscore ✔ Cannot start with a number ✔ No special symbols allowed ✅ 🔹 Python Data Types Python supports multiple data types such as: 📍 int (10, 20) 📍 float (12.5, 3.14) 📍 str ("Python") 📍 bool (True / False) 📍 list, tuple, set, dict ✅ 🔹 Type Checking & Type Casting We can check the type using: print(type(x)) And convert data types using: int(), float(), str() ✅ 🔹 Operators in Python Python provides different types of operators: ➕ Arithmetic (+, -, *, /, %) 🟰 Assignment (=, +=, -=) 🔍 Comparison (==, !=, >, <) 🧠 Logical (and, or, not) 📌 Membership (in, not in) 💡 Conclusion: Without understanding variables, data types, and operators, you cannot write proper Python programs. This chapter is the real base of coding! 📍 If you are a beginner, focus on practicing this chapter daily with small programs. #acsredutech #Python #PythonProgramming #LearnPython #Coding #ProgrammingForBeginners #DataTypes #Operators #ComputerEducation #SkillDevelopment #TechSkills #PythonCourse
To view or add a comment, sign in
-
-
🚀 Python Nested Loops – Master Repeated Actions Efficiently As part of my Python learning journey, I explored Nested Loops — a technique to perform repeated actions within loops. 🔗 Project Link: https://lnkd.in/dtMJEuhF --- 📊 What This Project Covers This script demonstrates how to use loops inside loops for complex iterations: ✔ "for" loop inside another "for" loop ✔ Nested "while" loops ✔ Combining loops with conditions ✔ Real-life examples like: - Printing patterns - Multiplication tables - Iterating over multi-dimensional data --- 💡 Why Nested Loops Matter - They allow handling multi-dimensional data - Essential for tables, matrices, and grids - Used in data analysis, algorithms, and simulations 👉 Nested loops make programs efficient and structured for repeated tasks --- 📈 Conclusion This project helped me understand how Python executes loops within loops. With a proper README: ✔ Anyone can understand the concept quickly ✔ Code becomes readable and professional ✔ Project becomes portfolio-ready Now anyone can learn: 👉 How to use nested loops 👉 How to solve repetitive problems 👉 How to structure complex iterations --- 🎯 What I Learned - Writing loops inside loops correctly - Using loops with conditions - Generating patterns and multi-dimensional outputs - Structuring code for readability --- 🔥 Next Step Continuing with: 👉 Modules & Functions 👉 Real-world Python projects 👉 Data Analysis applications --- If you are learning Python: 👉 Master nested loops — they are critical for repetitive tasks and patterns! 💬 Feedback is always welcome!
To view or add a comment, sign in
-
Python Learning Journey – Dictionaries Deep Dive Dictionaries are one of the most powerful and flexible data structures in Python. Today, I explored some important functions that every developer should know 👇 📌 Core Dictionary Functions: ✔️ len() – Returns number of key-value pairs ✔️ clear() – Removes all elements ✔️ get() – Access values safely without errors ✔️ pop() – Removes specific key and returns its value ✔️ popitem() – Removes last inserted key-value pair ✔️ keys() – Returns all keys ✔️ items() – Returns key-value pairs ✔️ copy() – Creates a shallow copy ✔️ setdefault() – Returns value of key (adds if not present) ✔️ update() – Updates dictionary with new key-value pairs 💡 Advanced Concept: ✨ Dictionary Comprehension – A concise way to create dictionaries in a single line Example: {x: x*x for x in range(5)} 🎯 Mastering dictionaries helps in writing efficient and clean code, especially when working with real-world data. #Globalquesttechnologies #GR Narendra Reddy #Python #CodingJourney #100DaysOfCode #Programming #SoftwareDevelopment #PythonBasics #Learning
To view or add a comment, sign in
-
-
🚀 Day 8 of Learning Python: Error Handling 💻 ✅ Back with a learning update 👉 Today I explored how Python handles errors gracefully using exception handling. This helps prevent programs from crashing and improves user experience. 🔹 Common Python Errors: ZeroDivisionError → Dividing by zeroValueError → Invalid input (e.g., text instead of number)TypeError → Wrong data type usedFileNotFoundError → File does not exist 💡 1. Simple Error Handling try: num = int(input("Enter number: ")) print(10 / num) except: print("Error occurred!")👉 Prevents the program from crashing on invalid input 💡 2. Handling Specific Errors try: num = int(input("Enter number: ")) print(10 / num) except ZeroDivisionError: print("Cannot divide by zero!") except ValueError: print("Please enter a valid number!") 💡 3. Using else try: num = int(input("Enter number: ")) except ValueError: print("Invalid input") else: print("You entered:", num)👉 else runs only when no exception occurs 💡 4. Using finally try: file = open("data.txt") except FileNotFoundError: print("File not found!") finally: print("Execution completed")👉 finally always executes (useful for cleanup) 💡 5. Handling Multiple Errors Together try: a = int(input()) b = int(input()) print(a / b) except (ValueError, ZeroDivisionError): print("Invalid input or division by zero") ⚡ Raising Your Own Error age = int(input("Enter age: ")) if age < 18: raise Exception("You must be 18+") 🔥 Custom Exception (Advanced) class MyError(Exception): pass try: raise MyError("Something went wrong") except MyError as e: print(e) ✅ Key Takeaway: Error handling makes your programs more robust, user-friendly, and professional. #Python #CodingJourney #LearnPython #30DaysOfCode #Programming
To view or add a comment, sign in
-
hey connection 🖖 Recently, I started exploring Machine Learning using Python, and one thing became clear very quickly: Python makes learning ML far more practical than I initially expected. Instead of dealing with complex implementations from scratch, Python provides powerful libraries that simplify the entire process. Tools like NumPy and Pandas help handle data efficiently, while libraries such as Scikit-learn allow beginners to experiment with real machine learning models without needing deep mathematical implementation at the start. While learning, I focused on understanding the actual workflow behind a machine learning project rather than just running code. The process usually starts with collecting and preparing data. This step turned out to be more important than I thought. Cleaning the dataset, removing errors, and organizing the information correctly directly affect how well a model performs. After preprocessing the data, the next step is training the model. Using Python, I experimented with basic models to understand how patterns in data are identified. Dividing the dataset into training and testing sets helped me see how models are evaluated and why accuracy alone doesn’t always tell the full story. One thing many beginners misunderstand is that machine learning is not only about algorithms. In reality, a large part of the work involves understanding the data, choosing the right features, and interpreting the results correctly. Python makes this learning process easier because it allows quick experimentation. Instead of spending weeks building systems from scratch, you can test ideas, analyze results, and improve models step by step. Currently, I’m continuing to explore data preprocessing techniques, model evaluation methods, and how different algorithms perform on real datasets. Machine Learning is a vast field, but starting with Python has made the journey much more approachable and practical. #snsinstitutions #snsdesignthinkers #designthinking
To view or add a comment, sign in
-
-
🔹 I recently explored how strings work in Python and how small syntax choices can make code more readable and efficient 👇 🔹 Blog Summary In this blog, I explain how Python allows strings to be defined using single quotes, double quotes, and triple quotes. I also cover when to use each approach, especially for multi-line text and writing clean, maintainable code. 🔹 Key Learnings ✔ Gained clarity on different ways to define strings in Python ✔ Learned how to handle quotes within strings effectively ✔ Understood the importance of readability in real-world coding #Python #DataStructures #MachineLearning #AI #LearningInPublic #Coding #Tech A heartfelt thanks to Vishwanath Nyathani, Raghu Ram Aduri, Kanav Bansal, and, Mayank Ghai, along with my mentors Harsha M. for their continuous guidance and motivation. Innomatics Research Labs
To view or add a comment, sign in
-
Understanding Regular Expressions in Python Regular Expressions (RegEx) are powerful tools used for searching, matching, and manipulating text. In Python, they are handled using the built-in re module. Why use RegEx? • Validate inputs (emails, phone numbers, passwords) • Search for specific patterns in text • Extract useful data from large datasets • Replace or clean text efficiently Key Functions in Python RegEx: • re.search() → Finds first match • re.findall() → Finds all matches • re.sub() → Replaces text • re.match() → Matches from beginning Final Thought: Mastering Regular Expressions can significantly boost your data processing and text handling skills as a developer. Thanks for : Sultan AL-Yahyai CodeAcademy_om Kulsoom Shoukat Ali #Python #Programming #DataAnalysis #Coding #RegularExpressions #TechSkills #Learning #Developers
To view or add a comment, sign in
-
-
Most people learning Python struggle with one thing: Classes. This is not due to how class definitions function or their complexity, but is mainly because they are typically explained in a complicated fashion. I recently shared an article where I break down Python classes in the simplest way possible — from basics to intuition, without unnecessary jargon. Furthermore, understanding class definitions is important in Python and as such is also a requirement when writing scalable/dependable systems. If you're learning Python or transitioning into ML, this will make things much clearer. What concept in Python took you the longest to truly understand? ♻️ Repost if you’re betting on yourself this time. ➕ Follow me, Samith Chimminiyan, for such ML-related content. Learning in public 🚀 #Python #MachineLearning #DataScience #Programming #OOP #LearnToCode #Developers
To view or add a comment, sign in
Explore related topics
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