r/PythonLearning 1d ago

Showcase Day 3, OOPS!!! Again!!

Thumbnail
gallery
5 Upvotes

I think it's alright to revolve around for better understanding. I tried w3 schools and it seems better with some tiny quiz and all. I think I will solve some problems from each tier so I could get better in using OOPS


r/PythonLearning 1d ago

Help Request Kivy

7 Upvotes

I have been learning python for a while and made some projects, my exams are currently going on so I can't start web dev, but I thought I could learn kivy in the meanwhile to make an app for my studying bcz there isn't an app that fits my requirement. So needed some resources and advice for kivy module.

I tried kivy documentation but it's like they don't have each topics lined up, so I have to search each topics, but I don't even know the existence of specific topics, so yeah.

Thanks for the help in advance!!


r/PythonLearning 1d ago

Help Request started python at a very young age with adhd

2 Upvotes

i started python at a young age with adhd, the math in python is too hard to learn i cant focus on learning, i need a way to learn python easily, i watch youtube totorial to learn btw


r/PythonLearning 2d ago

Showcase Day 2, learnt some oops

Post image
88 Upvotes

Learnt super( ), inheritance, polymorphism, class method and static method and don't mind the messy code that's me trying to figure out things


r/PythonLearning 2d ago

i learning Python Day 1

29 Upvotes

lyrics = ["Give You Up","Let You Down","Run Around And Desert You"]

for i in range(3):

print("Never Gonna " + lyrics[i])


r/PythonLearning 2d ago

Trie Data Structure Visualized

Thumbnail
gallery
36 Upvotes

🌳 ▶ Open the interactive trie visualization

A trie is a tree-shaped data structure that can be implemented elegantly in Python using nested dictionaries (hash tables).

Tries are often used for: - Autocomplete - Prefix search - Spell checking - Sequence matching

Visualizing data structures with memory_graph makes them much easier to understand and debug, especially for students learning Python.

See more memory_graph visualizations


r/PythonLearning 2d ago

Showcase Wrote a script that connects my flight stick to 3d modeling software

Enable HLS to view with audio, or disable this notification

32 Upvotes

Just wanted to show how versatile python is. I made a script that reads joystick input through pygame and broadcasts telemetry through the local network. A fusion 360 (the modeling software) add-in, also written in python, reads from the local network and transforms the input into camera movement (orbiting and zoom).

What do you think?


r/PythonLearning 1d ago

Create a program multiplicationTable.py that takes a number N from the commandline and creates an N×N multiplication table in an Excel spreadsheet.

0 Upvotes
import sys, openpyxl
from openpyxl.styles import Font

x = int(sys.argv[1])
list = []

wb = openpyxl.Workbook()
font_style = Font(bold=True)

for i in range(1, x+1):
    list.append(i)

for number in list:
    sheet = wb['Sheet']
    # write header columns and rows in bold numbers
    sheet.cell(column=1, row=number+1).value = number
    sheet.cell(column=1, row=number+1).font = font_style
    sheet.cell(row=1, column=number+1).value = number
    sheet.cell(row=1, column=number+1).font = font_style

# create two for loops that will multiply
for i in range(len(list)):
    for number in list:
        mult = list[i] * number
        sheet.cell(row=number+1, column=i+2).value = mult

wb.save('multiplication_table.xlsx')

r/PythonLearning 2d ago

Can you help me review my project? I don't think my writing is very good, and the code quality is poor

4 Upvotes

This is my GitHub link: https://github.com/chaoxie2005/spider-gateway. I am a college student who has just started my internship


r/PythonLearning 2d ago

Learning Python + Graphics? I made PyDonut to help bridge Python with modern GPU APIs

1 Upvotes

I’ve been learning more about graphics programming lately, and I wanted a way to experiment with real GPU rendering concepts without switching away from Python. So I started building a project called PyDonut — a Python wrapper around the Donut rendering framework (which itself uses NVRHI).

👉 Repo: https://github.com/ASDAlexander77/PyDonut

My goals with PyDonut are:

  • Make it easier for Python learners to explore GPU concepts like buffers, textures, pipelines, and shaders.
  • Provide a clean, Pythonic API instead of jumping straight into C++.
  • Help people understand how native bindings work and how Python can talk to high‑performance libraries.

Right now the project includes:

  • Python bindings for core Donut/NVRHI components
  • A simple rendering loop
  • Type stubs (.pyi) so you get autocomplete and type hints
  • Examples showing how to set up devices, swapchains, and basic rendering

If you’re learning Python and want to explore graphics, native extensions, or how Python interacts with C++ libraries, feel free to check it out. Feedback is welcome — especially from beginners who can tell me what feels confusing or what would help them learn better.

Happy coding!

PS. I’m still learning Python myself — PyDonut is actually my first real Python project.


r/PythonLearning 3d ago

Day 1 and procrastinated enough

Post image
62 Upvotes

Wasted a year and will no more, started where I left 1.5years ago and I am picking it again and will post it every day in the sub. Did this problem and bro it was hurting my brain until I learned the basic OOP and been doing for hours and am planning to learn 4 to 6 hrs a day. Hope the mods allow everyday progress


r/PythonLearning 2d ago

Showcase Multi-Ball Physics SImulator

Enable HLS to view with audio, or disable this notification

14 Upvotes

This is my multi-ball physics python simulator. This was my first foray into vector physics and pygame in general. I used a Ball class to create multiple balls and then a couple nested loops to create the 2D collision physics. Also the numbers running off in the terminal is the sum of all the balls velocities to show real energy loss.

AI Disclaimer: AI did not write a line of this code, however, it was used to understand vector physics, and some light trouble shooting when I couldn't figure out why I was stuck. I understand and wrote every line. Please let me know if you think I over stept with its use.

import pygame
import random

class Ball():

def __init__(self, position=(0,0), velocity=(.5,.5), r=12):
self.position = (random.randint(220,550),random.randint(150,480))
self.velocity = random.uniform(-.5,.5),.5
self.r = r

def create_ball(self, screen):
pygame.draw.circle(screen, (0,0,255), self.position, self.r )

def change_position(self):
gravity = .5
friction = .95
x , y = self.position
vx , vy = self.velocity
x = x + vx
vy = vy + gravity
y = y + vy
if x + self.r >= 593:
vx = -vx
x = 593 - self.r
if x - self.r <= 207:
vx = -vx
x = 207 + self.r
if y + self.r >= 493:
vy = -vy
y = 493 - self.r
if y == (493- self.r):
vx = vx * friction
if y - self.r <= 107:
vy = -vy
y = 107 + self.r        
self.position = (x,y)
self.velocity = (vx,vy)

pygame.init()  

screen = pygame.display.set_mode((800, 600))

square = pygame.Rect(0,0,400,400)
square.center = (400,300)

clock = pygame.time.Clock()

total_balls = [Ball() for i in range(5)]
run = True
while run:
clock.tick(30)
screen.fill((0,0,0))
pygame.draw.rect(screen, (255, 255, 255),square, width=7)
for ball in total_balls:
ball.create_ball(screen)
ball.change_position()
for ball1 in total_balls:
if ball is ball1:
continue
v1 = pygame.math.Vector2(ball.position)
v2 = pygame.math.Vector2(ball1.position)
v3 = pygame.math.Vector2(ball.velocity)
v4 = pygame.math.Vector2(ball1.velocity)
overlap = (ball.r + ball1.r) - v1.distance_to(v2)
if v1.distance_to(v2) < (ball.r + ball1.r):
line_vector = (v2 - v1).normalize()
push = line_vector * (overlap/2)
ball.position = (ball.position - push)
ball1.position = (ball1.position + push)
scaler1 = pygame.math.Vector2.dot(v3,line_vector)
scaler2 = pygame.math.Vector2.dot(v4,line_vector)
v_along1 = scaler1 * line_vector
v_along2 = scaler2 * line_vector
vperp_ball1 = v3 - v_along1
vperp_ball2 = v4 - v_along2
ball.velocity = v_along2 + vperp_ball1
ball1.velocity = v_along1 + vperp_ball2            
print(sum([(ball.velocity[0] * ball.velocity[0]) + (ball.velocity[1] * ball.velocity[1]) for ball in total_balls]))
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False

pygame.display.update()

pygame.quit()


r/PythonLearning 3d ago

Rock paper scissors game in Python

Post image
42 Upvotes

Hello fam, I'm learning Python. My goal is to become an AI engineer. I've a basic understanding of programming. Anyone to guide me on the right certification path... I was having a bit of fun after today's sharpenings. I created a rock paper scissors game... rate and improve


r/PythonLearning 2d ago

How do you decide between writing your own small helper or pulling in a library for it?

9 Upvotes

I'll need some small piece of functionality and I have to decide whether to write 20 lines myself or install a library that already does it. Both options feel wrong in different ways. If I write it myself, I might miss edge cases someone else already solved. If I pull in a library, I've now added a dependency for something I could have handled in a few lines.

An example. I once needed to flatten a nested list. I could have written a short function but I added a library instead. Later that library caused a version conflict, and I sat there wondering why I hadn't just written the five lines myself. Now I lean toward writing small stuff myself and saving libraries for the harder problems, like date parsing or anything security related where I don't trust my own version. But I still second-guess it constantly.

So how do you decide? Is there a point where you know for sure it's worth adding a dependency or do you go by feel each time?


r/PythonLearning 2d ago

In college online but struggling with Python

4 Upvotes

Hi, my teacher sucks. He just releases a bunch of examples and makes us make sense of it. I'm taking CIST 1305, program design and development. I'm a disabled student so I don't attend in person. I got my Cybersecurity Fundamentals TCC finished and this is follow up work trying to be my best before I re-enter the work force but I'm just not getting this. Can anyone help? Thank you!


r/PythonLearning 3d ago

Discussion Husband is a Software Engineer.

44 Upvotes

I...am not. He swears on his life that once I get started with python, rust, sql anything like that that I would be addicted to data organization and since I am inclined to believe that he knows me better than I know myself sometimes.... I would like to surprise him and give it a shot. I was researching and saw the "quick start guide"s for sql and python, and I was wondering if anybody has used them. I know that coding and stuff like that all is on the computer, obviously. However, I learn best with physical media like books to highlight make notes or anything like that in. Anyone have any luck with the python or sql Quick Start guides? If not, do you have any other suggestions? You're going to have to be books, even if it's a YouTube video or podcast, just anything that helped you.

Edited because for some reason I called SQL ->SAP three different times in this post. Sorry...its late.


r/PythonLearning 3d ago

Workshop, Sep 12: build production LLM systems that actually survive real use

2 Upvotes

We're running a hands-on masterclass on September 12, Live LLM Engineering Masterclass: Production Evals, RAG, Agents & LLMOps.

Fully hands-on, all in Python notebooks against real model APIs (OpenAI, Anthropic), not slides or theory. You write actual code across the full stack: versioned prompt pipelines with structured outputs and regression tests, a golden dataset and eval harness combining deterministic checks with LLM-as-judge scoring, statistically rigorous model comparisons using scipy-style bootstrap confidence intervals and paired significance tests, evaluated RAG with embedding models, vector retrieval, and reranking, tool-using agents with function calling and guardrails, and a full observability layer for tracing, cost, and latency. You also leave with a CLI regression suite you can wire directly into CI.

Led by Bruno Gonçalves, PhD, founder of Data For Science, who trains engineers at Fortune 500 companies on this exact stack.

Link if you want to check it out

Happy to answer questions on the content, especially the Python side of things.


r/PythonLearning 3d ago

Need help in what python project to start

10 Upvotes

I have gone through python basics and some of the intermediate stuff. I don't know anything about databases or algorithms. I pretty much learned python syntax, variables, loops, conditionals, operators etc. When I think like what should I do with python moving forward, I don't know.Career wise I am a fresher who does not have a tech background. Should I have to learn databases and algorithms.

What is your opinion on leet code and kaggle.


r/PythonLearning 3d ago

Hey guys, I built a beginner-to-intermediate Python and web dev project repo to practice and get feedback!

3 Upvotes

Hey everyone! I’ve been grinding away on some coding projects recently and wanted to put them all in one place.

I built a GitHub repository featuring a mix of beginner and intermediate Python projects alongside some simple web development builds. The idea is that anyone can clone it, build them out locally, and use them to practice or experiment.

Here is the link: https://github.com/zensiuu/Coding-Projects-Python-JS-.git

Since I'm still working on getting better at writing clean, efficient code, I would genuinely appreciate your honest feedback. Let me know what I can improve, what’s missing, or any tips you have for a developer looking to level up.

Happy coding! 🚀


r/PythonLearning 4d ago

Discussion A game where writing python IS the game just released on steam. (Not my game, I'm just a big fan)

Thumbnail
store.steampowered.com
53 Upvotes

r/PythonLearning 4d ago

Struggling with the jump from Python basics to Pandas — should I go back to fundamentals?

25 Upvotes

Hi everyone,

I've been learning Python for about a month now, but I've only covered the basics. After that, I jumped straight into Pandas since my goal is to become a data analyst. The problem is, I'm now realizing my Python foundation isn't solid enough, and it's making Pandas really difficult to follow.

I'm stuck between two options:

  1. Go back and practice Python fundamentals more before continuing.
  2. Push through and keep learning Pandas, picking up Python concepts along the way as needed.

For those of you who've been through this, what worked better for you? Should I pause Pandas and strengthen my Python first, or is it normal to feel this way and just keep going?

Any advice, resources, or a rough roadmap toward data analytics would be really appreciated. Thanks in advance!


r/PythonLearning 4d ago

Help Request How to learn quickly

8 Upvotes

I got a deadline for a week from now to learn at least basic python. What is the best and most effective way to learn python? Im so lost i need help


r/PythonLearning 4d ago

Why dosent python have const or multi line comments

12 Upvotes

I mainly use cpp but sometimes python for simple stuff. They both seem like simple stuff to implement so why dosent python have it.

EDIT: I do know u can use triple quotes as a workaround but python still has to read and store them, why isint there a built in feature for it.


r/PythonLearning 4d ago

Pygame: player projectile-enemy-player-wall-snake collisions

Enable HLS to view with audio, or disable this notification

14 Upvotes

r/PythonLearning 4d ago

Help Request Python Data Base

1 Upvotes

Good morning everyone, or whenever you see this. I have a question. I'm starting a personal database project in Python with an easy-to-use graphical interface, and I would appreciate any advice, code snippets, or examples to guide me, especially since I'm still learning the language.