Day 2/100: Mastering Data Types and Logic Today was all about how Python handles information. I dived deep into the mechanics of data and mathematical operations. What I tackled today: Data Types: Understanding Integers, Floats, and Booleans. Subscripting: Pulling specific characters out of a string (like a pro!). The len() Function: Measuring the length of data. Type Conversion: Converting data (e.g., String to Integer) to make calculations possible. Math in Python: Using mathematical operators, the round() function, and assignment operators. Daily Project: Tip/Bill Calculator I created a program that calculates how much each person should pay when splitting a bill, including the tip. It’s a real-world tool built with just a few lines of code! Step by step, I'm getting more comfortable with the logic. 🚀 #Python #100DaysOfCode #DataTypes #CodingCommunity #SoftwareDevelopment
Mastering Python Data Types and Logic
More Relevant Posts
-
🚀 Solved the “Two Sum” Problem | Data Structures & Algorithms Practice Today I solved the classic Two Sum problem—a fundamental question in data structures & algorithms. 🔹 Problem: 1 Given an array of integers and a target value, return the indices of two numbers such that they add up to the target. ⏱️ Complexity: Time Complexity: O(n) Space Complexity: O(n) 🔗 GitHub Repository (more DSA problems inside): https://lnkd.in/gdrbnQDF #DSA #ProblemSolving #Python #CodingJourney #SoftwareEngineering #LeetCode
To view or add a comment, sign in
-
-
Some instructions are used more than once. When working with data, certain operations tend to repeat. Cleaning a value. Checking a condition. Transforming a piece of information. Applying the same rule across different parts of a dataset. Writing the same set of instructions every time would quickly make code longer and harder to follow. This is where functions come in. A function is simply a way of grouping a set of instructions under a name so that the same logic can be used again whenever it is needed. Instead of rewriting the steps, the program calls the function and runs those instructions again. For example: def check_pass(score): if score >= 50: return "Pass" return "Fail" Once defined, the same logic can be applied wherever it is needed. check_pass(72) check_pass(43) The instructions stay the same. Only the input changes. Functions don’t introduce new logic. They organize existing logic so it can be reused clearly and consistently. And in larger programs, that organization becomes just as important as the logic itself. Day 28 / 30. #30DaysOfDataScience #Python #Functions #ProgrammingLogic #LearningInPublic
To view or add a comment, sign in
-
-
🚀 Day-56 of #100DaysOfCode 📊 NumPy Practice – Finding Unique Values & Frequency Today I practiced identifying unique elements and counting their occurrences using NumPy. 🔹 Concepts Practiced: ✔ np.unique() ✔ Frequency counting ✔ Handling duplicate values ✔ Efficient array analysis 🔹 Key Learning: Using return_counts=True makes frequency analysis simple and efficient without loops — very useful in data preprocessing. Slowly stepping into data analysis concepts using NumPy 💡🔥 #Python #NumPy #DataAnalysis #ArrayOperations #100DaysOfCode #LearnPython #CodingPractice #PythonDeveloper
To view or add a comment, sign in
-
-
🚀 Day-53 of #100DaysOfCode 📊 NumPy Practice – Conditional Array Modification Today I practiced conditional filtering using NumPy. 🔹 Concepts Practiced: ✔ Boolean indexing ✔ Conditional replacement ✔ Vectorized operations ✔ Efficient array manipulation 🔹 Key Learning: Using boolean indexing (a[a < 0] = 0) allows fast and clean data transformation without loops — one of NumPy’s biggest advantages. Slowly building strong fundamentals in NumPy & Data Handling 💡🔥 #Python #NumPy #DataScience #ArrayManipulation #100DaysOfCode #LearnPython #CodingPractice #PythonDeveloper
To view or add a comment, sign in
-
-
𝗜 𝗳𝗼𝘂𝗻𝗱 𝗮 𝟰𝟰× 𝘀𝗽𝗲𝗲𝗱 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝗶𝗻 𝗮 𝘀𝗶𝗺𝗽𝗹𝗲 𝘀𝘂𝗺() 𝗼𝗽𝗲𝗿𝗮𝘁𝗶𝗼𝗻 🚀 I benchmarked three ways of summing 100,000 numbers: • Manual for loop → ~11.4 ms • Built-in 𝘀𝘂𝗺() → ~8.27 ms • 𝗻𝗽.𝘀𝘂𝗺() → ~0.259 ms 𝗡𝘂𝗺𝗣𝘆 𝘄𝗮𝘀 ~𝟰𝟰× 𝗳𝗮𝘀𝘁𝗲𝗿 𝘁𝗵𝗮𝗻 𝗮 𝗣𝘆𝘁𝗵𝗼𝗻 𝗹𝗼𝗼𝗽 ⚡ The real insight isn’t that “NumPy is faster.” It’s about execution layers. A Python loop runs inside the interpreter with dynamic checks every iteration. 𝘀𝘂𝗺() shifts the work into C. 𝗻𝗽.𝘀𝘂𝗺() operates on contiguous memory using optimized low-level code, avoiding Python-level iteration entirely. Same computation. Different execution layer. Massive performance gap. #Python #NumPy #DataScience #LearningInPublic
To view or add a comment, sign in
-
-
Imagine trying to explain a complex 3D object using just one photo. Pick the wrong angle, and you might lose critical detail. The same thing happens when you try to simplify high-dimensional data. If you just drop a random axis to make it 2D, you could throw away crucial information and end up with a tangled mess. Enter Principal Component Analysis (PCA)! Instead of randomly dropping data, PCA rotates your entire coordinate system to find the absolute "best camera angle". Watch our quick 60-second visual breakdown below! 👇 if you want to dive deeper into the math behind the magic and get the Python code, Watch the full tutorial here: https://lnkd.in/gdGkEw8r #PCA #MachineLearning #DataScience #DataVisualization #Schovia #Shorts
To view or add a comment, sign in
-
Day 1 – Rebuilding Python Fundamentals from Scratch 🚀 Today I focused on deeply understanding variables and core numeric behavior in Python. Here’s what I covered: • Variables are references to objects in memory, not boxes storing values • Core data types: int, float, str, bool • Type casting and why int(x) doesn’t modify the original variable unless reassigned • Difference between / (true division) and // (floor division) • Why floor division moves LEFT on the number line for negative numbers • The mathematical identity behind modulus: a = (a // b) * b + (a % b) • Why -17 % 4 = 3 (not -1) • Why id(x) == id(y) can return True due to small integer interning Big insight: Understanding memory behavior and arithmetic rules removes confusion and prevents hidden bugs. Focusing on strong foundations before moving ahead. On to Day 2 💪 #Python #DataScience #MachineLearning #SoftwareEngineering #LearningInPublic
To view or add a comment, sign in
-
-
Spent today exploring pandas while starting work with the MovieLens dataset for a recommendation systems project. A few small observations from the process: • pandas makes it incredibly easy to move from raw CSV files to structured data exploration • building a user–movie matrix is just a pivot operation away • debugging environments in VS Code can be surprisingly tricky when working with virtual environments The most interesting part for me was realizing how quickly you can move from: raw rating logs → structured dataset → matrices suitable for recommendation algorithms. Next step: experimenting with similarity-based recommendations using the dataset. Small progress today, but the foundation for something much bigger. Challenge : what pandas method gave the output in the terminal 🙃 🙃 #MachineLearning #DataScience #Python #RecommenderSystems
To view or add a comment, sign in
-
-
Topic 7/100 🚀 🧠 Topic 7 — Lambda Functions Want to write a quick function in just one line? ⚡ 👉 What is it? Lambda functions are small anonymous functions defined using the lambda keyword. 👉 Use Case: Used in real-world applications for: Quick operations inside map(), filter() Sorting with custom logic Short, throwaway functions 👉 Why it’s Helpful: Reduces boilerplate code Makes code concise Useful for functional programming 💻 Example: # Normal function def square(x): return x * x # Lambda version square = lambda x: x * x print(square(5)) 🧠 What’s happening here? We replaced a full function definition with a single-line lambda expression. ⚡ Pro Tip: Use lambdas for small logic only — avoid them for complex functions. 💬 Follow this series for more Topics #Python #BackendDevelopment #100TopicOfCode #SoftwareEngineering #LearnInPublic
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
Wish you good luck in this journey, you should also provide github repo link :)