I was browsing through my old Python simulations I used to make in college — just for fun. Flower patterns, Sierpinski triangles, Barnsley ferns, fractal trees... all built with Python turtle and pygame. The problem? They only ran locally. Nobody could see them without installing Python and running the scripts themselves. So I built Py-Playground 🎮 A single site that runs all my old Python simulations directly in the browser — no installs, no setup, nothing. How? Pyodide compiles the entire CPython interpreter to WebAssembly, so real Python runs right inside your browser tab. For turtle graphics, I'm using RPi Foundation's SVG-rendering turtle library since tkinter doesn't exist in the browser. 7 turtle simulations live right now, 11 pygame sims coming soon. Sometimes your old side projects deserve a second life on the internet 🚀 🔗 Try it live: https://lnkd.in/gE_riZKf 💻 Source: https://lnkd.in/g7eCmjEe #Python #WebAssembly #Pyodide #OpenSource #BuildInPublic #GitHub #SideProjects
Python Simulations Run in Browser with Py-Playground
More Relevant Posts
-
🚀 Day 31 of My Python Full-Stack Journey 🐍 Today I learned about Types of Functions in Python based on Parameters and Return Values. Functions help us organize code and avoid repetition. Based on parameters and return values, functions can be classified into different types. 🔹 Function without Parameters and without Return Value This type of function does not take any input and does not return any value. It simply performs a task. Python Copy code def greet(): print("Hello, welcome to Python!") greet() 🔹 Function with Parameters and without Return Value This function takes input values but does not return anything. Python Copy code def greet(name): print("Hello", name) greet("Balaji") 🔹 Function with Parameters and Return Value This type takes input and returns a result using the return keyword. Python Copy code def add(a, b): return a + b result = add(5, 3) print(result) 🔹 Function without Parameters but with Return Value Python Copy code def get_number(): return 10 num = get_number() print(num) 💡 Key Takeaway: Understanding these function types helps in writing clean, reusable, and structured Python programs. Learning step by step and improving every day on my Python Full-Stack Journey 🚀 #Python #FullStack #CodingJourney #100DaysOfCode #PythonFunctions #LearningInPublic
To view or add a comment, sign in
-
-
Day 22 of My Python Full-Stack Journey — Comparison Operators! 🔍 Today I explored one of the most fundamental building blocks in Python — Comparison Operators! These are the tools Python uses to evaluate conditions and return either True or False. Sounds simple, but they're the backbone of every decision your code makes. Here's a quick recap of what I covered: The 6 Core Comparison Operators: == → Equal to != → Not equal to > → Greater than < → Less than >= → Greater than or equal to <= → Less than or equal to A few things that stood out to me today: 🔹 The difference between = (assignment) and == (comparison) — a classic beginner trap that I now fully understand! 🔹 Comparing strings in Python is case-sensitive. "Python" == "python" returns False — detail matters! 🔹 You can chain comparisons in Python like 1 < x < 10, which is something many languages don't support natively. Python makes this elegant and readable. 🔹 Comparison operators work across different data types, but mixing types carelessly (like "5" == 5) can give you unexpected results. Every if statement, every while loop, every filter in a list comprehension — they all rely on comparison operators under the hood. Mastering this felt like unlocking the logic layer of programming. 22 days in and the pieces are starting to connect. 💪 What's a comparison operator mistake that tripped you up when you were learning? Drop it below 👇 #Python #100DaysOfCode #FullStackDeveloper #LearningInPublic #PythonProgramming #CodingJourney #Day22 #WebDevelopment #TechCommunity
To view or add a comment, sign in
-
-
Day 6 of my Python journey 🐍🚀 Day 6 is in the books! Today was a mix of handling errors gracefully and discovering some syntax that is completely unique to Python. Here is a breakdown of what I learned and how my Next.js/TypeScript brain processed it: 🛡️ Exception Handling (Try / Except / Finally): In JS, we use try...catch to stop bugs from crashing the whole app. Python uses try...except. The logic is exactly the same, including the finally block that runs no matter what. I also learned how to raise custom errors (just like throw new Error in JS). 🤯 Loops with else: Wait, loops can have an else statement?! This blew my frontend mind a little bit. In Python, an else block attached to a for or while loop will run only if the loop finishes naturally (without hitting a break). Very cool, but definitely takes getting used to! ⚖️ Shorthand If/Else: This is Python's version of the JS ternary operator (condition ? true : false). Instead of symbols, Python reads like plain English: result = True if condition else False. 🕵️♂️ Mini-Project: I put it all together by building a Secret Language Encoder/Decoder! It takes user input, manipulates the strings, and spits out an encrypted (or decrypted) message. The pieces are really coming together, and building actual logic feels great. 📈 #Python #LearningInPublic #SoftwareEngineering #FrontendDev #CodeWithHarry #100DaysOfCode
To view or add a comment, sign in
-
-
What if one tool could manage both your Python packages and compiled system libraries? uv installs Python packages from PyPI, but it doesn't support compiled C/C++ libraries. The typical workaround is to install system libraries separately using an OS package manager, then manually align versions with your Python dependencies. Since these system dependencies aren't captured in project files, reproducing the environment across machines can be unreliable. pixi solves this by managing both Python packages from PyPI and compiled system libraries from conda-forge in a single tool. Quick comparison: • uv: fast, reliable lockfiles, Python-only • conda: system libraries supported, but slower and no lockfiles • pixi: fast, unified, with system libraries, lockfiles, and a built-in task runner In this article, I compare uv and pixi on a real ML project so you can see how they perform in practice. 🚀 Link: https://bit.ly/4t16m34 #Python #PackageManagement #DataScience
To view or add a comment, sign in
-
🔄 Python Control Flow: if/else & while Loops Master decision-making and repetition—the foundation of all Python programs: 1️⃣ if, if-else, if-elif-else # Basic if age = 18 if age >= 18: print("Adult") # Runs if True # if-else if age >= 18: print("Adult") else: print("Minor") # if-elif-else (multiple conditions) score = 85 if score >= 90: print("A Grade") elif score >= 80: print("B Grade") else: print("C Grade") Use Case: User authentication, grade calculators, form validation 2️⃣ while True: Infinite Loop Control # while True with break (user input loop) while True: user_input = input("Enter 'quit' to exit: ") if user_input.lower() == 'quit': print("Goodbye!") break # Exit loop print(f"You said: {user_input}") # while with counter count = 0 while count < 5: print(f"Count: {count}") count += 1 else: print("Loop completed!") # Runs if no break Use Case: Menus, games, continuous monitoring 💡 Pro Tips: - break: Exit loop immediately - continue: Skip to next iteration - else with loops: Runs only if no break - Avoid infinite loops Practice:! Practice: Build a calculator menu using while True + if-elif-else — Shiva Vinodkumar 📚 Resources: w3schools.com & JavaScript Mastery 💬 Comment LoopMaster for more! 👍 Like, Save & Share 🔁 Repost for beginners 👉 Follow for Python essentials #Python #Programming #ControlFlow #Loops #IfElse #Coding #ShivaVinodkumar
To view or add a comment, sign in
-
-
Day 46 : Python Conditional Statements – If/Else Today I understood the conditional statements used in Python. Hands-on : - Today I learned about conditional statements in Python, which are used to control the flow of a program based on conditions. - I started with the basic syntax of the if statement, understanding how Python evaluates conditions and executes code blocks. -I then explored the if/else statement, which allows execution of alternate code when a condition is false. - Moving forward, I practiced if/elif/else statements to handle multiple conditions efficiently. - I also learned how to write if/else in a single line (ternary operator), which makes simple conditions more concise. - Finally, I explored nested if/else statements, where one condition is placed inside another to handle more complex logic. Result : - Successfully understood how to implement conditional logic in Python using different forms of if/else statements. Key Takeaways : - If statement executes code only when a condition is true. - If/Else provides an alternative execution path. - If/Elif/Else helps handle multiple conditions efficiently. - One-line if/else (ternary) makes code concise for simple conditions. - Nested conditions allow handling complex decision-making scenarios. #Python #Programming #DataAnalytics #LearningJourney #ConditionalStatements #CodingBasics #DataScience #BeginnerPython #AnalyticsSkills
To view or add a comment, sign in
-
-
🚀 Day 39 | Python Functions Practice Today I continued practicing Python Functions by solving multiple problems related to numbers and strings. This practice helped me understand how functions work and how they can be used to organize code effectively. I implemented several function-based programs to strengthen my logic and clear my doubts about Python functions. The problems I solved include: Palindrome String Check – Comparing a string with its reverse to determine if it is a palindrome. Sum of Digits – Extracting digits using % 10 and calculating their sum. Product of Digits – Multiplying each extracted digit of a number. Armstrong Number Check – Checking if the sum of cubes of digits equals the original number. Reverse a Number – Reversing digits using % and // operations. Palindrome Number Check – Comparing the number with its reversed value. Count Vowels in a String – Counting occurrences of a, e, i, o, u. Count Consonants in a String – Counting alphabet characters excluding vowels. Count Vowels and Consonants – Using two counters to track both values. Perfect Number Check – Checking if the sum of proper divisors equals the number. By solving these problems using functions, I improved my understanding of: Writing reusable code Passing arguments to functions Returning results from functions Applying loops and conditions inside functions Today’s practice helped me clear several doubts related to Python functions and improved my problem-solving skills. Learning step by step and becoming more confident with Python every day. 🚀 #Day39 #Python #Functions #ProblemSolving #ProgrammingLogic #10000Coders #FullStackJourney #SravanKumarSir
To view or add a comment, sign in
-
🐍 Built & Published My Own Python Library on PyPI Recently, I built and released a Python package called meme-errors. It’s a small utility that plays a meme sound whenever an exception occurs turning boring crashes like: - TypeError - ValueError - FileNotFoundError into something a bit more dramatic 😄 But the real purpose behind this project was deeper: • Understanding Python packaging properly • Handling static asset distribution inside a package • Structuring reusable, installable libraries • Publishing and maintaining a project on PyPI Side projects are powerful. They let you experiment, ship fast, and learn things you don’t always explore in day-to-day work. Shipping > Thinking. You can try it: pip install meme-errors Would love feedback from fellow Python developers and backend engineers 🙌 #Python #BackendDevelopment #OpenSource #PyPI #SoftwareEngineering #SideProjects
To view or add a comment, sign in
-
Have you tried using PyO3? It is a library that helps integrate Rust with Python. It allows you to either expose Rust code as a Python extension module or embed the Python interpreter directly into a Rust application. A common usecase is when you have built your application in Python and start running into bottlenecks. Because Python being a dynamically typed interpreted language running on the GIL, has inherent performance limitations. I am sure some of you out there have already ran into it. Rust can give you a significant uplift here. Rather than rewriting the entire program, you profile your Python application, rewrite the hot paths in Rust, compile it as a native extension, and let the Python interpreter consume it seamlessly. Libraries like Polars and Pydantic V2 are great real-world examples of this pattern. In HFT systems built in Rust, the usecase flips. You want the strategies and algorithms written in Python because they are easier to iterate on, backtest, and hand off to quants. But the execution layer needs to be fast and deterministic which is happening in microseconds. Here you embed the Python interpreter into the Rust binary, load your core algorithm logic at runtime, and let the Rust runtime drive execution while calling into Python only when needed. It's fun to do this! PyO3 paired with Maturin (for build tooling) makes both of these workflows surprisingly ergonomic. How effectively have you used PyO3 in your projects or organizations? . . . . #rust #python #pyo3 #HFT #programming
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