💥Day 3 of my 70 Days Python Learning Challenge💥 Today, I learned about data types in Python. This wasn’t completely new to me because I’ve worked with data types before using MIT App Inventor, but seeing how Python handles them was helpful. In Python, some basic data types include: Integer (int): These are whole numbers, both positive and negative. Python can handle very large integers as long as there is enough memory. Examples: 5, -17, 286479, 10 String (str): Strings are used to store text. They are written using single quotes, double quotes, or triple quotes for multiple lines. Once created, strings cannot be changed. Examples: "Hello", 'Python', "Welcome" Float (float): These are numbers with decimal points. They are used when more precision is needed. Integers can be converted to floats. Examples: 3.5, 0.25, 10.0 Boolean (bool): Booleans represent truth values. They can only be "True" or "False". They are commonly used in conditions and decision-making. Examples: True, False Understanding data types is important because they determine what kind of operations the computer can perform. Using the wrong data type can lead to errors, so choosing the right one matters. Making progress one day at a time! On to Day 4✌️ #70dayschallenge #python #programming #datatypes
Learning Python Data Types in 70 Days Challenge
More Relevant Posts
-
#21/21 Python Learning "NEW MINI PROJECT " 🍁 Day 21 of Learning Python Today I built my second mini project: a Password Generator 🔐 🛠️ What it does: ~Creates strong, random passwords ~Includes letters, numbers, and symbols ~Lets you choose the password length ~Shuffles characters to keep it unpredictable 💡 What I learned: 🔸 How to use Python’s random and string modules 🔸 Writing functions to keep code clean and reusable 🔸 Ensuring security by mixing different character types ✨ Reflection: Every project makes Python feel less intimidating and more exciting. This one is practical—I can actually use it in real life! 📌 "Day 21: Completed my second mini project—a Python Password Generator! It creates strong, random passwords with letters, numbers, and symbols. Loving how projects make learning stick. 👉 Here you go : CODE import random lower = "abcdefghijklmnopqrstuvwxyz" upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" digits = "0123456789" special = "!@#$%^&*()-_=+[]{}|;:,.<>?/`~" all_characters = lower + upper + digits + special length = int(input("Enter the desired password length: ")) if length < 4: print("Password length should be at least 4 to include all character types.") else: password = [ random.choice(lower), random.choice(upper), random.choice(digits), random.choice(special) ] password += random.choices(all_characters, k=length - 4) random.shuffle(password) final_password = ''.join(password) print("Generated Password: ", final_password) #Python #21DaysOfCode #MiniProject" #learning #beingconsistent #waytogo
To view or add a comment, sign in
-
🚀 Python Learning Journey – Exploring Data Types in Python As a part of my Python learning journey, today I explored Data Types in Python – the foundation of writing efficient and meaningful programs. Understanding data types helps us store, manage, and manipulate data effectively in any application. 🔹 Built-in Data Types in Python: 📌 Numeric Types int → Whole numbers (e.g., 10, -5) float → Decimal numbers (e.g., 3.14, -2.5) complex → Complex numbers (e.g., 2 + 3j) 📌 Sequence Types str → Text data ("Hello") list → Ordered, changeable collection [1, 2, 3] tuple → Ordered, unchangeable collection (1, 2, 3) 📌 Set Types set → Unordered, unique elements {1, 2, 3} 📌 Mapping Type dict → Key-value pairs {"name": "Priyanka", "age": 21} 📌 Boolean Type bool → True or False 💡 I also learned how to check the data type using: x = 10 print(type(x)) Every small step in learning builds a strong foundation for problem-solving and data analytics. Excited to continue exploring more Python concepts! 🔥 #Python #LearningJourney #DataAnalytics #Programming #Coding #100DaysOfCode
To view or add a comment, sign in
-
-
🚀 Day 6 of My Python Learning Journey – Types of Data 🐍 Today I learned about Data Types in Python. Data is the input we use to perform tasks and operations in a program. Understanding data types helps Python know how to store and use values correctly. 🔹 Types of Data I Learned: 1️⃣ Integer (int) ➡️ Numbers without a decimal point ➡️ Can be positive or negative Copy code Python x = 25 2️⃣ Decimal / Float (float) ➡️ Numbers with a decimal point ➡️ Can also be positive or negative Copy code Python pi = 10.5 3️⃣ Single Character (char concept in Python) ➡️ Can be an alphabet, digit, or symbol ➡️ Must be enclosed in single quotes Copy code Python ch = 'A' 4️⃣ String (str) ➡️ A group of characters ➡️ Enclosed in double quotes Copy code Python name = "Kalyan" 5️⃣ Boolean (bool) ➡️ A data type with fixed values ➡️ Either True or False Copy code Python is_active = True ✨ Learning data types helps me understand how Python handles different kinds of information in real programs. 📌 Day 6 done. Slowly building my Python foundation step by step 💪 #Day6 #PythonLearning #DataTypes #BeginnerToPro #CodingJourney #LearnPython 🚀
To view or add a comment, sign in
-
-
Day 1/6 Python Is Not Hard, You’re Just New Quick reminder for anyone learning Python for data analytics: Python isn’t hard. It just feels hard because it’s new, and new things always feel uncomfortable at first. At first, learning Python appears to be very simple. Like this: name = "Data Analyst" print(name) Here’s what’s happening: name is called a variable A variable is simply a name we assign to a piece of data so we can use it later "Data Analyst" is the value stored inside that variable print() is a built-in function that tells Python to display the result on the screen Nothing complex, just understanding how data is stored and shown. Now this: numbers = [10, 20, 30] print(sum(numbers)) What’s happening here: numbers is a list, meaning a collection of values sum() is another built-in function that adds all the values together print() shows us the final result This is data thinking. Small code. Simple logic. Real progress. You don’t start data analytics with dashboards or machine learning. You start by understanding how data is stored, calculated, and interpreted. If your code breaks sometimes, that’s okay. If you get errors, that’s normal. It means you’re learning. 👉 Follow me for Day 2 👉 Comment “I’m in” if you’re starting Python for data analytics Let’s keep it simple and consistent #Python #LearningPython #DataAnalytics #PythonForDataAnalysis #BeginnerInTech #LearningInPublic
To view or add a comment, sign in
-
-
Understanding the Uniqueness of Python Sets Sets in Python are powerful data structures that effectively manage collections of unique items. When you create a set, any duplicates in the input are automatically discarded, ensuring that each element appears exactly once. This property is vital when you need to maintain distinct values, such as usernames, tags, or product IDs, without the clutter of repetitions. The uniqueness feature of sets helps enhance memory efficiency and data integrity. For instance, when you add an item like "grape," Python checks if it’s already in the set. If "banana" is added again, it remains unaffected, showcasing sets' ability to prevent redundancy. Consequently, using sets results in cleaner applications as you eliminate unnecessary data duplication. Sets include methods like `add()` for introducing new elements and `remove()` for deleting existing items. However, using `remove()` can raise a `KeyError` if the item you're trying to delete isn't found, which can be a common pitfall for beginners. To prevent this error, it’s recommended to use `discard()`, which simply ignores the removal if an item is missing, allowing for safer manipulations. Understanding the performance benefits of sets is crucial. Operations such as membership testing—checking if an item exists—are significantly faster with sets compared to lists, thanks to their underlying hash table structure. This efficiency makes sets an optimal choice for scenarios requiring frequent checks for unique items or lookups. Quick challenge: Why might using `discard()` be preferred over `remove()` when manipulating sets? #WhatImReadingToday #Python #PythonProgramming #DataStructures #LearnPython #Programming
To view or add a comment, sign in
-
-
Today’s Python focus was 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻𝘀. I worked on understanding why functions exist and how they make code reusable, readable, and easier to manage instead of repeating the same logic again and again. 𝗪𝗵𝗮𝘁 𝗜 𝗽𝗿𝗮𝗰𝘁𝗶𝗰𝗲𝗱 𝘁𝗼𝗱𝗮𝘆: • Writing a simple function to calculate the volume of a cylinder instead of doing direct calculations • Passing parameters to functions and returning values • Calling the same function multiple times with the same inputs • Understanding the difference between built in functions, library functions, and user defined functions • Using functions to calculate total expenses from a list • Comparing custom logic with built in functions like sum() • Using functions from the math module such as sqrt() and ceil() • Working with *args to accept a variable number of arguments • Working with **kwargs to pass key value pairs into a function • Writing and using lambda functions for simple operations • Creating placeholder functions using pass 𝗞𝗲𝘆 𝘁𝗮𝗸𝗲𝗮𝘄𝗮𝘆𝘀: • Functions help avoid repetition and keep code clean • Parameters and return values make functions flexible • Built in and library functions save time and reduce errors • *args and **kwargs make functions more dynamic • Lambda functions are useful for short, simple logic Functions made it clear that Python is not just about writing code that works once, but about writing code that can be reused and maintained. If you are learning Python too, which function related concept took you some time to fully understand? #Python #PythonLearning #FunctionsInPython #ProgrammingBasics #LearningInPublic #DataAnalytics #Upskilling
To view or add a comment, sign in
-
#20/21 Python Learning 🍁 MY FIRST PYTHON MINI PROJECT - Number Guessing Game! As part of my Python learning journey, I recently built a simple number guessing game using Python in VS Code. To make it clearer, I also recorded a short demo video explaining how the game works step by step. ❔ What this project includes: - Random number generation -User input handling -Conditional logic (if-else) -Looping for repeated attempts -Clean and readable Python code ✨ This project helped me strengthen my Python basics and improve my logical thinking. Small projects like these are really motivating and show how concepts work in real scenarios. ➡️CODE: import random target = random.randint(1, 100) while True: userChoice = int(input("Guess the target : ")) if userChoice == target: print("Success : Correct Guess!!") break elif userChoice < target: print("Your number was too small. Take a bigger guess.") else: print("Your number was too big. Take a smaller guess.") print("----- GAME OVER -----") 📌 Next goal: Build more mini-projects and move towards intermediate Python concepts. Feedback and suggestions are welcome! #Python#PythonProjects#LearningByDoing#BeginnerDeveloper#VSCode#Programming#CodingJourney#TechSkills
To view or add a comment, sign in
-
🚀 Python Ka Chilla 2024–2025 | Day 4 Learning Journey with Dr. Ammar Tufail Day 4 of my Python learning journey was all about understanding the building blocks of Python programming. Today’s concepts may seem simple, but they form the foundation of everything we will build later in data science and machine learning. 🔹 What I Learned Today 🧩 Variables in Python I learned how variables are used to store data in Python and how they help make code more readable and flexible. Understanding variables is essential for writing meaningful and dynamic programs. 📌 Types of Variables We explored different data types in Python, such as integers, floats, strings, and booleans. Knowing how Python handles different types of data is crucial for avoiding errors and writing efficient code. 🔄 Type Casting in Python Today’s session also covered type casting, which allows us to convert one data type into another when needed. This is especially useful when working with user input or real-world data where formats may vary. 🌟 Key Takeaway Today reinforced an important lesson: strong fundamentals lead to strong skills. Variables and data types may look basic, but they are the backbone of every Python program and data science workflow. A big appreciation for Dr. Ammar Tufail, whose beginner-friendly teaching style makes complex ideas easy to grasp. His step-by-step approach builds confidence and clarity, especially for those starting from scratch. May Allah bless him for sharing his knowledge and guidance. 🤲 💬 If you’re learning Python, what concept did you find most challenging at the start—variables, data types, or type casting? Let’s share and learn together! 🔖 Hashtags #PythonKaChilla #PythonLearning #ProgrammingBasics #DataScienceJourney #LearningJourney #TechStudent #ContinuousLearning #PythonFundamentals #DrAmmarTufail
To view or add a comment, sign in
-
-
🚀 Day 28 of Learning Python – Consistency > Perfection(week 4) Over the past 28 days, I’ve been consistently learning and practicing Python, focusing on understanding concepts deeply rather than just rushing through them. 📌 Topics I’ve learned so far: Variables & Data Types Conditional Statements (if / elif / else) Short-hand if-else (ternary operator) Loops (for, while, for-else) Functions (def, parameters, return values) Recursion (basic understanding) Lists, Tuples, Sets & Dictionaries String operations & formatting (f-strings) Exception Handling try, except, else, finally keyword Custom Errors Defining and raising custom exceptions Enumerate function User input & basic validations Debugging common Python mistakes What is a Virtual Environment in Python and why it matters 🧠 Learning approach: Some days → learning new concepts Some days → pure practice & revision Identifying weak areas (like recursion & exception handling) and working on them intentionally I’ve realized that making mistakes is part of the process, and fixing them teaches more than writing perfect code on day one. 📈 Goal: To become confident in Python fundamentals with clean logic, fewer mistakes, and real-world problem solving. If you’re also learning Python — stay consistent, even 30–60 minutes a day makes a difference. #Python #LearningJourney #Consistency #Programming #Day28 #Coding #PythonBasics
To view or add a comment, sign in
-
Day 2 of my Python learning journey! 🐍 Today I explored a few core concepts that make coding in Python feel more powerful: ✨ range() — helps create a sequence of numbers easily, like range(1, 6) → 1 to 5. ✨ Typecasting — converting one data type to another, e.g., int("5") turns a string into a number. ✨ String slicing — getting parts of text, like "Python"[0:3] → "Pyt". ✨ List slicing — grabbing parts of lists, like [10, 20, 30, 40][1:3] → [20, 30]. These small tools make loops, data processing, and everyday tasks cleaner and more efficient. Still learning step by step — but loving the process! 💪 #Python #CodingJourney #Day2
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