I Just built a simple Python mini — Bill Splitter! Ever gone out with friends and struggled to split the bill correctly? I tried solving that with a small Python program. try this 👉 What it does: Takes total bill amount Adds a 10% tip Splits equally among people 📊 Example: Bill = ₹1000 Tip = ₹100 Total = ₹1100 4 people → Each pays ₹275 🧠 What I learned: How to take user input Basic calculations in Python Writing clean and readable output This may look small… but every big system starts like this. Today it's a bill splitter. Tomorrow it can become a full payment app 🚀 #Python #BeginnerProject #CodingJourney #LearnByDoing #AIEngineerJourney
Python Bill Splitter Program for Easy Payments
More Relevant Posts
-
Understanding Division in Python – Integer vs Float While practicing Python, I worked on a simple yet important concept: division operations. a = int(input()) b = int(input()) print(a // b) print(a / b) What’s happening here? // → Integer Division Returns only the whole number (quotient), discarding decimals / → Float Division Returns the exact result, including decimal values -> Example: If the input is: 4 6 Output will be: 0 0.6666666666666666 -> Key Takeaway: Understanding the difference between integer and float division is essential when solving real-world problems, especially in data processing and algorithm design. #Python #CodingJourney #100DaysOfCode #LearningPython #ProgrammingBasics
To view or add a comment, sign in
-
Here's a Python dictionary merge challenge from @dontmisstmr — can you get it right without running the code? dict1 = {"name": "Alice", "age": 25} dict2 = {"city": "Noida", "age": 26} merged = dict1 | dict2 print(merged) The | operator was introduced in Python 3.9. When both dicts share a key, which value wins? Drop your answer in the comments! #Python #SoftwareDevelopment #CodingChallenge #ProgrammingTips #TechCommunity
To view or add a comment, sign in
-
𝗗𝗮𝘆 𝟵/𝟯𝟬 Instead of forcing my old coding habits into Python, I’m leaning into how the language handles data natively. Why write four lines of code when you can write one? 1. 𝗧𝗵𝗲 𝗦𝘁𝗮𝗻𝗱𝗮𝗿𝗱 𝗪𝗮𝘆 (Looping & Appending): nums = [1, 2, 3, 4] squared = [] for n in nums: squared.append(n * n) 2. 𝗧𝗵𝗲 𝗠𝗼𝗱𝗲𝗿𝗻 Approach 🚀: squared = [n * n for n in nums] 👉🏻It’s cleaner, faster, and much more intuitive. These are the small details that make the Python journey so satisfying🤌🏻 At what point do you find List Comprehensions become too complex? Do you stick to them for simple one-liners, or use them for nested logic too? #Python #30daysofcode #CodingJourney #Day9 #SoftwareDevelopment
To view or add a comment, sign in
-
-
The most misunderstood line of code in Python🛑 if __name__ == "__main__" Most beginners copy-paste this without knowing what it actually does. If you've ever imported a file and had your entire script execute unexpectedly—this is why. In this 2-minute breakdown, I explain: ✅ What __name__ actually stores. ✅ Why your code runs differently when imported vs. executed. ✅ How to structure your scripts like a Senior Dev. Master the most misunderstood line in Python here: https://lnkd.in/e5gEGpYq #python #codingtips #backend #microlearn #pythonifnamemain
Python if __name__ == "__main__" Deeply Explained | The Most Misunderstood Line in Python
https://www.youtube.com/
To view or add a comment, sign in
-
Python’s syntactic sugar or a developer’s nightmare? 💻 I came across this snippet today and it’s a great reminder of why understanding the internals of your language matters. a, b = a[b] = {}, 5 At first glance, it looks like a typo. In reality, it’s a masterclass in Python’s assignment order and object referencing. The Challenge: Can you explain why the output is {5: ({...}, 5)}? Let’s discuss in the comments. ⬇️ #Python #SoftwareDevelopment #Programming #TechCommunity #CodingChallenge #BackendEngineering
To view or add a comment, sign in
-
I kept seeing coding agents drift into pip install, raw python, and manual dependency edits in Python projects. It works until it doesn’t, and the inconsistency becomes annoying fast, especially when the agent also uses small background Python scripts you did not explicitly ask for. This post is a short reflection on that pattern and the small uv-first setup I now use to keep Claude Code and Codex more consistent across runs. I wrote up the reasoning, the repo-level instruction approach, and the example setup here: https://lnkd.in/dAvyjEwr
To view or add a comment, sign in
-
-
💡 Tiny Python tip that improves code clarity With a normal tuple, you have to remember what each index stands for. That knowledge lives in your head, not in the code. `namedtuple` fixes this by giving semantic meaning to each position. You still get immutability and performance, but with clear, self-documenting access. #Python #PythonProgramming #CleanCode #CodingBestPractices #CodeReadability
To view or add a comment, sign in
-
-
One student asked me: “Why is my Python code not working?” I checked his code. Logic was correct. Syntax was correct. Still… error. The problem? 👉 One missing colon (:) That day he learned something important: In Python, small details matter. A missing symbol can break everything. From that day, he started: • Reading errors carefully • Checking code line by line • Being patient while debugging That’s how real programmers grow. Not by writing perfect code. But by fixing mistakes. 👉 What was the smallest mistake that caused a big error for you? #BluJayTechnologies #Python #Learning #SoftwareCoaching
To view or add a comment, sign in
-
-
Rules for declaring python veriables:- 1) Must start with letters (a-z, A-Z) or underscore _ 2)Must not start with numbers (1 to .... ) 3) Variables are case sensitive ( python and Python both are different) 4) We cannot use keywords as variables ( if, def, while ...) Variable declaration is main part of any program. First impression will be starting with it, so while declaring variables need to take care. #python #learn #fast #beginner #automation
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