Project Update: Rock Paper Scissors (Python) Refactored the game logic by simplifying win/lose conditions into cleaner boolean expressions. Improved control flow for better readability and accuracy. Added a “play again” option using loop control (break / continue) to enhance user interaction. These changes made the code more efficient, readable, and closer to real-world application logic. #Python #CodeRefactor #LearningProgress #BeginnerToIntermediate
Refactored Rock Paper Scissors Game Logic in Python
More Relevant Posts
-
Python loop constructs: Worked with for loops for deterministic iteration over iterables and while loops for condition-driven execution. Practiced nested loops for multi-dimensional data traversal and analysed control flow using break and continue. Also explored the for - else pattern, which executes only when a loop completes without interruption useful for search and validation logic. #Python #ControlFlow #ProgrammingConcepts #SoftwareDevelopment #LearningPython
To view or add a comment, sign in
-
LeetCode Problem 73: "Set Matrix Zeroes": Given an m x n integer matrix matrix, if an element is 0, set its entire row and column to 0's. You must do it in place. The below implementation in Python successfully resolves this problem in optimal way with constant space complexity. The logic is quite straightforward, use the first row and column as markers to determine whether the row or column contains zero inside or not. But before this traverse the first row and column to check whether they contain zeroes or not, store this result in a boolean variable. Now based on markers make the values of corresponding cells as zero. Time Complexity: O(m*n) #DSA #LeetCode #Python #OptimalSolution #Matrix #CompetitiveProgramming #ProblemSolving #CodingChallenge #Algorithms #Logic #DataStructures
To view or add a comment, sign in
-
-
Day 47 | DSA with Python 🐍 Today I focused on strengthening my understanding of Sliding Window & Subarray Problems. What I practiced: Difference between brute force vs optimized (sliding window) Fixed-size vs variable-size sliding window Common patterns: Maximum / Minimum sum subarray of size k Longest subarray with condition Window expansion & contraction logic Key takeaway: Instead of recalculating everything, reuse previous window results to reduce time complexity from O(n²) → O(n) 🚀 #Day47 #Python #DSA #SlidingWindow #ProblemSolving #CodingJourney #SDE
To view or add a comment, sign in
-
-
Day 43 – Finding a Substring in a String: Today’s task focused on checking whether a given substring exists within a string using logical conditions instead of complex methods. This exercise reinforced understanding of string comparison, user input handling, and conditional statements, which are essential for basic text search and validation tasks. GitHub Code: https://lnkd.in/gSvGR_NZ #Day43 #100DaysOfCode #Python #StringManipulation #LogicBuilding #ProblemSolving #DailyCoding #Consistency
To view or add a comment, sign in
-
-
Sharing a demo of another small project I built using Python and Streamlit — a Seed Classification App 🌱 In this application, users can enter seed measurements like height, width, and thickness, and the system categorizes the type of seed based on these parameters. This project helped me understand how parameter-based classification logic and interactive UI components can be combined to build simple decision-support tools. It was a great exercise in turning numerical inputs into meaningful predictions using Python. Excited to keep building more data-driven applications! #Python #Streamlit #MachineLearningBasics #Classification #StudentDeveloper
To view or add a comment, sign in
-
continue Simulation python core 3.12 Centrifugal pump Calculating the operating point by solving the intersection of the pump curve \(H_{p}(Q)\) and the system curve \(H_{sys}(Q)=h_{static}+kQ^{2}\). 4. Implementation Notes for Python 3.12 Performance: Leverage NumPy's vectorized operations for speed, especially if simulating many time steps or multiple operating points.Compatibility: Python 3.12 introduces faster exception handling and minor deprecations (e.g., co_lnotab removed), but standard numerical libraries (numpy, scipy) are fully supported.
To view or add a comment, sign in
-
-
Solved leetcode problem: Longest Substring Without Repeating Characters Approach: Use a set to maintain unique characters in the current window. Expand with r. If duplicate appears → shrink from l until valid. Track max window length. Consistent pattern practice > memorizing solutions. #LeetCode #SlidingWindow #Python #DSA #CodingInterview
To view or add a comment, sign in
-
-
🚀 Day 29/30 – Mini Python App Challenge Built a Turn-Based Battle Game ⚔️ using Python. Features: • Player vs Computer • Attack & Defend mechanics • Health tracking system • Random damage simulation Concepts used: Game loops, state management, random logic GitHub 👇 🔗 https://lnkd.in/dCSFW_Hd Almost at Day 30 🔥 #Python #LearningInPublic #30DaysOfCode #GameDev #github #
To view or add a comment, sign in
-
-
Day 44 – Python with DSA 🐍📘 Today I learned one of the most important DSA techniques: Sliding Window. 🔹 What I understood: Used for subarray Helps optimize solutions from O(n²) to O(n) Works by adding one element and removing one element instead of recalculating 🔹 Problems practiced: Maximum Average Subarray Minimum Size Subarray Sum This concept really helped me understand how to think efficiently while solving problems. Slow progress is still progress 🚀 Consistency > Speed 💪 #Day44 #Python #DSA #SlidingWindow #LeetCode #SDE#CodingJourney
To view or add a comment, sign in
-
-
feb-22-26 LeetCode 762 – Prime Number of Set Bits in Binary Representation Solved today’s problem! ✅ The task is to count numbers in a given range [left, right] whose number of set bits (1s in binary form) is a prime number. ⚡ Complexity: Time: O(n log n) Space: O(1) A simple yet powerful problem combining binary operations and number theory 🔥 #LeetCode #DailyCoding #BitManipulation #Python #ProblemSolving #CodingJourney
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