🎮 Built a Rock-Paper-Scissors Game in Python — With a GUI Twist! Needed a break from dashboards and data pipelines, so I whipped up something fun: a Rock-Paper-Scissors game using Python and Tkinter! It’s a simple project, but packed with personality — and a great way to flex those GUI muscles. 💡 What it does: 1. You pick Rock, Paper, or Scissors — your move, your rules. 2. The computer picks too (randomly, like a squirrel on espresso). 3. You get instant results: win, lose, or tie — all with a splash of drama. There’s even a “Play Again” button, because let’s be honest… one round is never enough. 🏆 What you’ll see: 1. You Win! 🎉 Time to brag. 2. Computer Wins! 🤖 Bow to the silicon overlord. 3. It’s a Tie! 🍪 Everyone gets cookies. 🧰 Tech Stack: 1. Tkinter for the GUI 2. random for the computer’s chaotic energy 3. PIL and time if you want to get fancy with images or suspense 😄 Why I built it: Sometimes, you just want to code something playful. This project helped me brush up on event handling, GUI layout, and making Python feel like a game engine — minus the 3D headaches. Want to try it out or see the code? Drop a ✋ and I’ll send the warriors your way. #PythonProjects #PIL #Tkinter #RockPaperScissors #WeekendBuild #LearnByBuilding #PlayAgain
More Relevant Posts
-
Problem: A messy folder full of unsorted photos. Solution: Automation! 💪 I wrote a handy Python script, the Photo Organizer Tool, to tackle this. It looks at the metadata of each photo (.jpg/.jpeg) to find when it was taken and automatically moves it into a subfolder named like YYYY_Mon (e.g., 2025_Oct). Built using Python, Pillow (for reading EXIF data), and Tkinter (for the folder selection dialog). It's a simple tool that saves a lot of manual sorting time!! See the code on GitHub: https://lnkd.in/ggvyMJtx #PythonScript #FileManagement #PhotoTools #Tkinter #Pillow #Automation #Developer #Coding
To view or add a comment, sign in
-
Built a Snake-Water-Gun Game in Python Just created my own version of the classic hand game - think Rock-Paper-Scissors with a twist! Had a blast building this mini project from scratch. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 How It Works: 🐍 Snake drinks Water 💧 Water rusts Gun 🔫 Gun shoots Snake ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✨ What I Built: Smart computer opponent with randomized moves Clean input validation system Multiple rounds with replay option User-friendly interface with instant feedback Modular, well-documented code structure ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💡 Skills Applied: This project helped me practice Python fundamentals including dictionary mappings, control flow logic, the random module, function-based architecture, and handling user input effectively. ━━━━━━━━━━━━━━━━━━━━ 🔗 Code available on GitHub : https://lnkd.in/dQjEDmW7 💬 Drop a comment if you'd like to see a tutorial walkthrough! Always excited to learn and build! 💻✨ #Python #PythonProgramming #Coding #Programming #LearnToCode #Developer #SoftwareEngineering #TechProjects #CodeNewbie #PythonProjects #OpenSource #GitHub #BuildInPublic #DeveloperCommunity
To view or add a comment, sign in
-
Really enjoyed this read from Python Snacks about using uv to help sidestep having to create a new virtual environment when working on a quick project (or perhaps having to deal with some other dependencies). Classically speaking, you would either have to pollute your current environment or switch over to a new environment. A really cool feature with uv allows you to declare dependencies in your python script directly. The syntax is as follows: # /// script # dependencies = ['package_1', 'package_2'] # /// uv will create a temp virtual environment prior to the script executing, install the dependencies, and execute the script. At the conclusion of the script execution, the virtual environment will be deleted. This is incredible for quick projects, prototyping, or avoiding having to set up a virtual environment for those who that may not be a common workflow for them. Below is an example script named test.py that I used this on: # /// script # dependencies = ["numpy"] # /// import numpy as np x = np.array([[1,2,3], [4,5,6]]) print(x) I then ran (in a terminal): python -m uv run test.py Below was the output I got: Installed 1 package in 450ms [[1 2 3] [4 5 6]] Really cool! Thankful they shared this article! #Python #VirtualEnvironments #DevTools #PythonTips #CodeSnippets #PyDev #PythonSnacks #SoftwareEngineering #Prototyping #RapidDevelopment #PythonScripts #DependencyManagement #UVTool #CodingProductivity #PythonEcosystem
To view or add a comment, sign in
-
“From Rock-Paper-Scissors to Snake-Water-Gun: A Python Twist” A console-based Snake, Water, Gun game (our local twist on Rock, Paper, Scissors). It’s simple, interactive, and a great refresher in Python fundamentals. Here’s what’s happening under the hood: 1. The random module helps the computer make its choice. 2. User input is validated and compared against game rules. 3. A clean logic system decides the winner each round: Gun beats Snake Snake beats Water Water beats Gun 4. The program tracks and displays ongoing scores until the user decides to stop. 🧠 Main methods used: 1. get_computer_choice() → random selection 2. get_user_choice() → user input validation 3. check_winner() → rule-based comparison logic 4. display_result() → formatted output with results 5. play_game() → the main loop managing flow and scores 💡 Key takeaways: This project is a compact demo of Python’s functions, loops, conditionals, and user interaction — all working together in a smooth, replayable program. Sometimes, the best way to stay sharp is to build something small that makes you smile. #Python #Programming #Coding #SoftwareDevelopment #Developer #PythonProjects #GameDevelopment #TechCommunity #LearnByBuilding #AI #ProblemSolving
To view or add a comment, sign in
-
Excited to share a project I just built! 🚀 From a simple Python script to a live, interactive web app! I created an Object Detector that can analyze any image you upload and identify the objects within it. This was a fantastic experience in building and deploying a complete machine learning application. The best part? It's incredibly fast to build. Here's the tech stack I used: Python: For the core logic. Gradio: For building the interactive web UI with just a few lines of code. Hugging Face transformers: To load a powerful, pre-trained object detection model. Going from a local ML model to a shareable, public demo was way simpler than I thought. It's amazing what you can build with these tools! You can try the live app for yourself here: https://lnkd.in/dvdeYM7D Let me know what you think. I'd love for you to test it with your own photos! #MachineLearning #Python #Gradio #HuggingFace #DataScience #Projects #ObjectDetection #DeepLearning #Portfolio
To view or add a comment, sign in
-
Problem: Given a string containing ()[]{}, determine if the parentheses are valid. A string is valid if brackets close in the correct order and type. ⬇️ ⬇️ ⬇️ My initial intuition: 😎 Thought of using a stack immediately — push openings, pop on closings. ☠️ But the first few implementations broke on tricky cases like ([)]. 🤡 I was popping and comparing in the wrong order and couldn’t figure out how to validate the pairings cleanly. ⬇️ ⬇️ ⬇️ After careful debugging: 😎 Discovered that flipping my mapping made the logic much simpler: { ')': '(', ']': '[', '}': '{' } 💡 This way, every closing bracket directly tells me which opening it expects. 😎 The stack now works perfectly — last in, first out — catching even the toughest edge cases. 🌟🌟🌟 learned about little micro optimizations: -> to create a local reference of the map helps with access times. -> not unravelling map with .values() calls, instead created a set of opening parenthesis. ✅ Intuition was right this time. 😅 Execution... not so much. #LeetCode #ProblemSolving #Python #LearningJourney #Coding
To view or add a comment, sign in
-
-
Why I Prefer Saving Plotly Graphs as HTML? Saving Plotly visuals as HTML keeps them interactive, shareable, and standalone. Unlike static images, HTML files let you zoom, hover, and explore data right in your browser — no Python setup needed. They’re perfect for sharing insights with clients or teammates, embedding in dashboards, or showcasing projects online. Note: if you use include_plotlyjs='cdn' instead of 'inline', the viewer needs internet access to load the Plotly library. If you want full offline capability, use 'inline'.
To view or add a comment, sign in
-
🤖 Give your preferred LLM as much context as possible in **a text file**! Don't seal it away in the prompt! 🤖 I was using Anthropic's Claude Code today in the terminal and it was *great*. Really accelerated a solution for a client who needed some data transformed from one format to another. (Python to the rescue.) As I was crafting a long prompt about which data elements in the input go to which in the output...I realized: a prompt is a terrible place for this info. So I opened a text file, wrote the context there (using Markdown), saved it to the relevant folder, and told Claude Code to look for it. Now, if I ever need to revise that Python script, the documentation is human-readable and in the same place as the script itself - not locked behind a proprietary app's Web interface or in a forgotten history window. ❓ How do you ensure your workflows are resilient, and don't rely on one specific tool?
To view or add a comment, sign in
-
🚀 DSA Progress – Day 108 ✅ Problem #3304: Find the K-th Character in String Game I 🧠 Difficulty: Easy | Topics: String, Simulation, Character Manipulation 🔍 Approach: Implemented an iterative string-building simulation to generate characters step by step until the length of the string reaches k. Step 1 (Initialization): Start with the base string result = "a". Step 2 (Expansion Rule): For every iteration, create a new version of the string by incrementing each character of the current string ('a' → 'b', 'b' → 'c', … 'z' → 'a') and append it to the original string. Step 3 (Stop Condition): Continue expanding until the string length becomes at least k. Step 4 (Answer): Return the (k-1)th character from the final string (since Python uses 0-based indexing). 🕒 Time Complexity: O(k)-we generate characters until the length reaches k. 💾 Space Complexity: O(k) — the built string grows proportionally with k. 📁 File: https://lnkd.in/g4pnXWep 📚 Repo: https://lnkd.in/g8Cn-EwH 💡 Learned: This problem helped reinforce the idea of string growth patterns and character transformation using ord() and chr(). It was a great exercise in understanding simulation-based problems, where you build patterns step by step until reaching the desired condition. Also, it improved my clarity on how to handle alphabet wrapping ('z' → 'a') efficiently in Python. ✅ Day 108 complete — leveled up from 'a' to 'z' and looped back like a pro! 🔠⚡💪 #LeetCode #DSA #Python #Strings #Simulation #CharacterManipulation #DailyCoding #InterviewPrep #GitHubJourney
To view or add a comment, sign in
-
🚀 Just built the first version of my own programming language — JSC (Just a Simple Compiler)! Over the past few days, I’ve been experimenting with building a custom compiler and interpreter using Python. The idea is to have a simple, human-readable scripting language that ends statements with semicolons, uses var for declarations, render for output, and even supports a future AI helper command assist. Here’s a quick example: /-----------------------------------------------/ | | *c Just a Simple Compiler Example v1.1 | | var name = "Manvendra"; | var x = 5; | var y = 10; | | render "Hello, " + name + "!"; | var total = y - x; | render "Total = " + total; | /-----------------------------------------------/ Running this gives: /-----------------------/ | | Hello, Manvendra! | Total = 5 | /-----------------------/ I also added type-smart addition, comments, and planned AI-assisted syntax hints 👨💻 Still early, but it feels great seeing something I imagined actually run line by line like a real language. Will keep evolving it — maybe next step: loops, conditionals, and basic error handling! #Python #CompilerDesign #ProgrammingLanguage #DevProject #LearningInPublic #FrontendToSystems
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