Day 8/50 of Coding Challenge 🚀 Solved Quadratic Equation using Python Implemented a program to calculate roots using the discriminant (b**2 - 4ac), handled edge cases, and formatted output to 2 decimals output to 2 decimals. 💡 Example: a=1, b=-5, c=6 -> Roots : 3.0, 2.0 #Python #Nxtwaveintensive #Coding #ProblemSolving #SoftwareDevelopment
Solving Quadratic Equations with Python
More Relevant Posts
-
🚀 Day 4/100 – Python Today I worked on solving a Quadratic Equation using Python. Instead of just writing code, I focused on understanding the logic behind it. Equation: ax² + bx + c = 0 Key learning from today: ✔ How to convert mathematical formulas into code ✔ Understanding the role of the discriminant (b² - 4ac) ✔ How different values of the discriminant affect the result ✔ Handling edge cases like negative values (using cmath) #100DaysOfCode #Python #ProblemSolving #LearningInPublic
To view or add a comment, sign in
-
-
Rock-Paper-Scissors game using Python! 🐍 🔹 User selects rock, paper, or scissors 🔹 Computer generates a random choice 🔹 Game logic determines win, lose, or tie 🔹 Displays results with clear feedback 🔹 (Optional) Score tracking & replay feature 💡 This project helped me understand conditional statements, loops, and random functions in Python. 🚀 Learning by building simple and interactive projects! #Python #MiniProject #GameDevelopment #Coding #StudentDeveloper #Tech #CodSoft
To view or add a comment, sign in
-
🤜 Python Challenge #10 – Answer Revealed! Tuples can be repeated using the * operator. 👉 t * 2 (Repeats the tuple 2 times) Output: (1, 2, 3, 1, 2, 3) #python #pythonchallenge #codechallenge #code #pythontuple #pythonbasics #programming #coding #learnpython #100daysofcode
To view or add a comment, sign in
-
-
Day 8/30 – Python Coding Challenge 🐍 📌 LeetCode Problem 11: Container With Most Water 💡 Problem: Find two lines that form a container holding the maximum water. 🧠 What I learned: • Two-pointer technique • Optimizing brute force (O(n²) → O(n)) • Smart decision making using minimum height 💻 Example: Input: [1,8,6,2,5,4,8,3,7] Output: 49 🚀 Insight: By moving the pointer with smaller height, we can efficiently maximize the area. Learning to think smarter, not harder 💪 #30DaysOfCode #Python #LeetCode #TwoPointers #CodingChallenge #ProblemSolving
To view or add a comment, sign in
-
-
Understand Python's case sensitivity through a relatable traffic light analogy. This clip explains why 'print' works while 'Print' fails, emphasizing that programming languages, like road rules, require strict adherence to predefined syntax and keywords. #python #codingbasics #casesensitivity #programmingsyntax #pythontutorial #softwaredevelopment #beginnercoding
To view or add a comment, sign in
-
Remove all spaces from a given string while preserving the original order of characters. The objective is to efficiently clean the string by eliminating whitespace without altering character sequence, a common requirement in data preprocessing and text handling. #geekstreak60 #npci #Python #Coding #ProblemSolving #StringManipulation
To view or add a comment, sign in
-
-
Day 5/30 – Python Coding Challenge 🐍 📌 LeetCode Problem 14: Longest Common Prefix 💡 Problem: Find the longest common prefix among an array of strings. If none exists, return "". 🧠 What I learned: • String manipulation techniques • Efficient comparison using prefix reduction • Handling edge cases 💻 Example: Input: ["flower","flow","flight"] Output: "fl" 🚀 Insight: By taking the first string as a reference and reducing it step-by-step, we can efficiently find the common prefix. Consistency over perfection 💪 #30DaysOfCode #Python #LeetCode #Strings #CodingChallenge #ProblemSolving
To view or add a comment, sign in
-
-
💻 Exploring Recursion in Python 🚀 Today I worked on implementing two classic recursive problems — Factorial and Fibonacci — in Python. At first, small mistakes like typos and function naming issues slowed me down, but debugging them helped me understand recursion much better. 🔁 Key Learnings: • Importance of base conditions in recursion • How recursive calls build up the final result • Debugging is where real learning happens Seeing the Fibonacci output finally work (233 for n=13) was a satisfying moment! 🙌 Step by step, getting closer to mastering problem-solving and logic building. #Python #CodingJourney #Recursion #LearningByDoing #Debugging #100DaysOfCode #DeveloperLife #Programming #TechSkills
To view or add a comment, sign in
-
-
Today I explored Python Dunder Methods with practical coding examples. ✔Object creation using init ✔ Custom behavior using str and len ✔ Operator overloading (add, sub) ✔ Comparison methods (eq, gt) Understanding these concepts helped me see how Python works internally #Python #BackendDevelopment #CodingJourney #LearnInPublic
To view or add a comment, sign in
-
🔁 For Loop vs While Loop in Python — Simple Difference Understanding loops is one of the first steps in mastering Python. Here's a quick comparison: ✅ For Loop Used when the number of iterations is known. Example: Iterating through a list, string, or range. for i in range(5): print(i) ✅ While Loop Used when the number of iterations is unknown and depends on a condition. i = 0 while i < 5: print(i) i += 1 📌 Key Difference for loop → iterate over sequence while loop → run until condition becomes False 💡 Tip: Use for loops for cleaner and readable code when working with collections. Use while loops when waiting for a condition (like user input). #Python #Coding #Programming #PythonBasics #LearnPython
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