Day01 of #100DaysofCode in Python #100DaysOfCode #Python #CodingJourney #Programming #LearningInPublic 📖 What I Learned #What is a Variable? $Variable:- In programming, a Variable is a named storage location of a memory that holds a value Example Message = "Hello, 100daysofcode!" print(Message) #Rules for Declaring Python Variables i) Variable names can contain only letters, numbers, and underscores. ii) A variable can start with a letter or an underscore, but not with a number Example:- we can start a variable message_1 but not 1_message iii) Spaces are not allowed in variable names, but underscores can be used to separate words in variable names Example:- "greeting_message" is a valid variable, but "greeting message" is not iv) Special Characters like @, #, $, %, and etc are not allowed to use as variable name v) Avoid using Python reserved keywords as variable and function names Tip: Variable names should be short and descriptive
Learning Variables in Python on Day 01 of #100DaysOfCode
More Relevant Posts
-
Day 44: Python Packages A package in Python is a way of organizing related modules together in a folder. It’s like the next step after modules → for better structure and reusability. 🔹 Key Points: A module = single file (.py) A package = folder containing multiple modules + an __init__.py file Packages make it easier to manage large projects 🔹 Types of Packages: 1. Built-in Packages → Already included with Python (json, email, xml) 2. External Packages → Installed using pip (numpy, pandas, requests) 🔹 Real-life Analogy: Think of a library 📚 → Book = Module Shelf = Package Whole library = Project 👉 In short: Packages help in organizing and scaling Python projects efficiently. #Python #PythonProgramming #LearnPython #Coding #Programming #PythonPackages #BuiltInPackages #ExternalPackages #PythonForBeginners #TechLearning #ITKnowledge #CodeNewbie #100DaysOfCode #Day44 #KaifTechTalks
To view or add a comment, sign in
-
-
Stop Wasting Time Googling Basic Python Commands. ✋ If you write Python professionally or are learning to code, you know how often you have to look up the same commands for Modules, File Handling, or Exception Handling. I created this Ultimate Python Command Cheat Sheet to keep all those core commands in one place. It covers everything: Basic Data Types & Functions Control Structures (if/else, for, while) Decorators & List Comprehensions Save this image right now. Your next coding session will be faster. Call to Action: Hit 'Like' if you're saving this for later, and Comment with your favorite Python module! 👇 #Python #DataScience #Programming #CodingTips #TechEducation
To view or add a comment, sign in
-
-
Mastering Functions in Python – The Building Blocks of Programming If you’re learning Python, one of the most powerful concepts you’ll use every single day is Functions. What is a Function? A function is a block of reusable code that performs a specific task. Instead of repeating yourself, you can write a function once and call it whenever needed. Why are Functions Important? Improve code reusability Make programs cleaner & easier to maintain Help in debugging & scaling projects Allow modular programming (breaking problems into smaller steps) Example: # Simple function to add numbers def add_numbers(a, b): return a + b print(add_numbers(5, 10)) # Output: 15 🔹 You can also use: Default arguments Keyword arguments Lambda (anonymous) functions Recursive functions Whether you’re writing small scripts or building data pipelines, functions are the foundation of clean, efficient Python code. Keep practicing, and you’ll soon start thinking in terms of functions naturally! #Python #Programming #Coding #Functions #LearningPython #DataAnalytics #TechSkills #CareerGrowth #CodeNewbie #SoftwareDevelopment
To view or add a comment, sign in
-
The secret to Python's user-friendliness? It's the ABCs. 💡Before creating Python, Guido van Rossum was a contributor to the ABC language—a 10-year research project to design a programming environment for beginners. ABC introduced many ideas we now consider “Pythonic”: • generic operations on different types of sequences, • built-in tuple and mapping types, • structure by indentation, • strong typing without variable declarations, and more. It’s no accident that Python is so user-friendly. Python inherited from ABC the uniform handling of sequences. 👩🏻🏫Which of these Python features—like structure by indentation or strong typing—do you think has been the most impactful on the industry? 🏷️ #Python #Pythonic #Programming #CodeQuality #GuidoVanRossum #LanguageDesign #CleanCode #DeveloperInsights
To view or add a comment, sign in
-
🚀 Python Dictionaries Made Simple! In Python, a Dictionary is a collection of key-value pairs. Each key is unique, and we can easily access, update, or remove data. Here are some useful dictionary methods with examples 👇 ✅ get() – Access values safely ✅ keys() – Get all keys ✅ values() – Get all values ✅ items() – Get key-value pairs ✅ update() – Update dictionary ✅ pop() – Remove a key ✨ Learning Python step by step and sharing my journey here 💻 #Python #Coding #DataScience #MachineLearning #PythonForDataScience #100DaysOfCode #LinkedInLearning #Programming
To view or add a comment, sign in
-
🚀 Python Function Practice – From Strings to Numbers & Prime Sums 💡Today, I worked on some exciting Python exercises to strengthen my understanding of functions, loops, and problem-solving logic.💡 Here's what I practiced: 1️⃣ Maximum Length Between Two Strings ✨ ▪Learned how to compare two strings and determine which one is longer. ▪Explored edge cases when strings have the same length. 2️⃣ Largest Number Among Three Numbers 🔢 ▪Practiced finding the largest number using if-else and ternary operators. ▪Strengthened my conditional logic skills. 3️⃣ Palindrome Check 🔄 ▪Checked whether a string reads the same backward as forward. ▪Understood how to reverse strings and apply logic concisely. 4️⃣ Sum of Prime Numbers in a List 🧮 ▪Learned how to identify prime numbers from a list. ▪Calculated the sum of all prime numbers using loops and conditionals. #Python #Programming #Coding #PythonExercises #LearnToCode #ProblemSolving #DeveloperJourney #CodeNewbie #TechLearning
To view or add a comment, sign in
-
🐍 Day 10 of 30: String Manipulation in Python A string is just text in Python, like "Hello" or "Python is fun!". Python gives us many built-in methods to change, analyze, and clean up strings. ✨ Some useful methods: .upper() → makes all letters UPPERCASE .lower() → makes all letters lowercase .replace(old, new) → replaces part of the text with something new 💻 Example: text = "Hello, World!" print(text.upper()) # HELLO, WORLD! print(text.lower()) # hello, world! print(text.replace("World", "Python")) # Hello, Python! 🎯 Practice Task: Take any sentence (like your name or a favorite quote) and try: Converting it to uppercase & lowercase Replacing one word with another Checking its length using len() #Python #Programming #Strings #Day10 #LearnPython
To view or add a comment, sign in
-
🔁 Understanding Loops in Python Loops are one of the most powerful concepts in Python — they help you execute a block of code multiple times, saving effort and reducing redundancy. Python mainly supports two types of loops: 1️⃣ for loop Used to iterate over a sequence (like a list, tuple, string, or range). 👉 Example: for i in range(5): print(i) 🧠 This prints numbers from 0 to 4. You can also loop through lists, strings, or dictionaries. 2️⃣ while loop Runs as long as a condition is true. 👉 Example: count = 0 while count < 5: print(count) count += 1 🧠 This keeps running until count becomes 5. #Python #PythonProgramming #Coding #Programming #LearnToCode #SoftwareDevelopment #PythonLearning #Developers
To view or add a comment, sign in
-
-
Have you ever written Python code and faced a mistake that broke your entire program? 🐍 Python looks simple, but developers often make some common mistakes: ✅ Indentation errors ✅ Mutable default arguments ✅ Confusing `is` vs `==` ✅ Copying lists vs referencing them Paying attention to these small things can make your code cleaner, more efficient, and bug-free. 👉 Question for you: What’s the most common Python mistake you’ve seen? Share in the comments 👇 #Python #Programming #DataScience #MachineLearning #CodingTips
To view or add a comment, sign in
-
Stop Guessing, Start Mastering Python Collections! 🐍 This is a must-have cheat sheet for every developer working with Python. Lists, Tuples, Sets, and Dictionaries are the foundational data types—and knowing when to use each (mutable vs. immutable, ordered vs. unordered, duplicates or not) is crucial for writing efficient code. Save this for a quick reference on their key properties and most useful methods like append(), union(), get(), and pop(). Which one do you use the most in your daily projects? 👇 #Python #DataStructures #CodingTips #SoftwareDevelopment #Programming
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
Let's grow together 🔥