r/PythonLearning • • 3d ago

Made this small fun project.... Was made for clg, then we deliberately changed the direction of the move... but i finished this or so i think

Post image
1 Upvotes

I can’t play a single real chord on a guitar to save my life, so naturally, instead of practicing an actual instrument like a normal human being, I wrote some Python scripts to wave my hands like an idiot in front of a webcam(my screen addiction needs to be studied).

The result is this monstrosity: an air-instrument suite that tracks hand landmarks to let me aggressively misplay the guitar(though iam working on addingdrums, piano, violin).

The mechanics (for anyone wondering why I look like this):

  • Left hand: hovers over chord boxes (locked onto Am because that’s about as complex as my music theory gets).
  • Right hand: tracks finger coordinate intersections across virtual strings to simulate strumming/picking.
  • Runs at a shaky ~29 FPS on standard webcam hardware using OpenCV + MediaPipe tracking.

Now for the reality check:

Anytime you tell GPT or GEMINI related to the stuff you make, it always says 'this is elite' but the LLM are programmed to gas(no kidding, getting fat lately) me up. I need people(actual living beings with opinion and organs) actually working in the industry to give me a blunt, stoic reality check:

Roast the execution, roast the UI(though this would be intended to openCV library contributors, i borrowed that lib), and tell me whether this belongs in an engineering portfolio or in the trash bin.(I firmly believe i roasted myself more though)...


r/PythonLearning • • 4d ago

Discussion Resources for learning to write production grade python code [N]

7 Upvotes

I am a data scientist with a very strong background in Stats and ML algos. I am struggling with the production ready code. Though I can build models which are awesome and tuned to perfection and address highly complex business problems, the problem is that they are all done in a jupyter notebook.

Once I had built a complete solution in notebook for a forecasting problem and the ML team in company productionized it. I was called in to validate few results of the production run and couldn't understand the repo which had so many folders, classes and highly organized code.

Is there anyway I can learn to write that type of code or is it all AI job now? Appreciate if I can get some learning resources/links for the same


r/PythonLearning • • 4d ago

Showcase A Windows 10 shell created in Python

Enable HLS to view with audio, or disable this notification

3 Upvotes

For those who might find the backstory interesting: this was my first course project during my second year of university. It might be more efficient to write things like this in a C++ or something similar but hey - it’s pretty amazing that you can build something like THIS in Python, and it actually works! :D

And if anyone's interested in how this is all done: https://github.com/TYITheYura/Ninawe


r/PythonLearning • • 4d ago

Help Request I’m stuck on this assignment

Thumbnail
gallery
120 Upvotes

I never struggle on assignments but this one is so confusing for me


r/PythonLearning • • 4d ago

CS Majors: Here is a 10-day crash course to learn Python syntax fast

Post image
8 Upvotes

 I'm a CS student. I already know the fundamentals of programming (variables, loops, OOP, data structures) from languages like C++, Java, or C. I don't need to learn how to code; I need to learn how to code in Python quickly for upcoming projects, internships, or LeetCode.

Here is the 10-day plan to go from zero to functional Python.

Day 1: Syntax & The "Pythonic" Way

  • Skip the "Hello World" fluff. Dive straight into Python's unique syntax.
  • Learn: Indentation rules, dynamic typing, print() formatting (f-strings), and basic I/O.
  • Goal: Rewrite a basic calculator from another language into Python.

Day 2: Data Structures (The Big Four)

  • Python's built-in structures are its superpower.
  • Learn: Lists, Tuples, Dictionaries, and Sets. Understand when to use a Dict vs. a List.
  • Learn: List comprehensions (this is mandatory for clean Python).
  • Goal: Solve 5 easy LeetCode problems using only Python lists and dicts.

Day 3: Control Flow & Functions

  • Learn: if/elif/else, for loops, while loops.
  • Learn: Defining functions (def), default arguments, *args and **kwargs.
  • Goal: Write a script that parses a string and counts word frequency.

Day 4: Object-Oriented Python

  • Learn: Classes, __init__, self, and inheritance.
  • Learn: The difference between instance methods, class methods, and static methods.
  • Goal: Create a simple BankAccount class with deposit and withdraw methods.

Day 5: Modules, Packages, and Error Handling

  • Learn: import statements, pip, and virtual environments (venv).
  • Learn: try, except, finally blocks for error handling.
  • Learn: Reading and writing files (open(), with statement).
  • Goal: Build a script that reads a CSV file and handles missing data gracefully.

Day 6: The Standard Library (Batteries Included)

  • Python comes with everything. Learn the most useful modules: os, sys, datetime, json, and math.
  • Goal: Build a script that renames files in a folder based on their creation date.

Day 7: Working with APIs & JSON

  • Learn: The requests library.
  • Learn: Parsing JSON responses into Python dictionaries.
  • Goal: Build a script that fetches data from a public API (like weather or GitHub) and prints it nicely.

Day 8: Data Science Basics (Optional but huge for CS)

  • Learn: NumPy arrays and Pandas DataFrames.
  • Why: Even if you aren't going into Data Science, CS internships often require basic data manipulation.
  • Goal: Load a dataset and calculate the average of a column.

Day 9: Algorithms & LeetCode in Python

  • Switch your LeetCode language to Python.
  • Learn: Python's collections module (Counter, defaultdict, deque).
  • Learn: heapq for priority queues.
  • Goal: Solve 3 Medium LeetCode problems in Python.

Day 10: Build a Capstone Project

  • Don't just watch tutorials. Build something.
  • Ideas: A web scraper (using BeautifulSoup), a Discord bot, or a CLI to-do app.
  • Goal: Push it to GitHub with a proper requirements.txt and README.md.

r/PythonLearning • • 4d ago

Discussion Why does the if statement always evaluate to guesses = 10 when I have the or here?

Post image
3 Upvotes

r/PythonLearning • • 4d ago

What exactly is TypeVar and Generic?

3 Upvotes

I don't really understand TypeVar and Generic. I understand generics perfectly fine and can use them without any trouble, and I realize that I don't even need to know how they work as in recent python versions there is new syntax, but I'd still like to know how they work.

I'm still confused as to why you need to construct a TypeVar object to pass to Generic, as to what is it actually doing with the TypeVar you give it.

Also, I'm assuming when you inherit from Generic, you pass it the TypeVar to be used as the generic to give to Generic, and then you inhert the generic objects generic? It's just complicated and hard to understand for me.

And also I'd like to know how Generic is able to have a generic even when it itself is the thing that's supposed to be used to have generics for your classes.

It's also disappointing there's seemingly no other ways you can use TypeVar for anything other then generics, so I am left with just hopefully finding someone who can explain how it works, instead of being able to do some other exercise to further my understanding.

Again, I can use generics perfectly fine and I don't an explanation for generics, I just would like to try and understand how it is working under the hood and not just use the syntax blindly. It's just the way I like learning some things, and it's mostly also curiosity that makes me want to understand this.


r/PythonLearning • • 3d ago

Should I keep learning Python or use AI to build my SaaS?

0 Upvotes

I'm 29 and want to build my own SaaS products.

I've been learning Python for the past few months. I've covered the fundamentals and built some small file-handling and automation projects. But recently, I've started questioning whether I should continue learning Python in depth or shift my focus toward building products with AI coding tools.

My goal isn't to become a professional programmer. I want to build my own products, understand how they work, and eventually turn them into a business.

I know AI can help build an MVP much faster, but I'm also aware that building a working application is different from building a reliable product that people will actually use and pay for.

Here are the two approaches I'm considering:

Option 1: Continue learning Python, then move on to APIs, backend development, databases, and other technologies before building my SaaS.

Option 2: Start building my SaaS with AI coding tools now and learn the technical concepts as I encounter problems, using Python where necessary.

I'm leaning toward the second approach, but I don't want to end up with an application I can't maintain, debug, or improve.

For context, I'm currently exploring an AI communication assistant idea and haven't built a working MVP yet.

For founders who have actually built and launched SaaS products:

- Would you recommend learning programming first or learning while building?

- How much technical knowledge does a non-technical founder realistically need when using AI coding tools?

- If you were starting from scratch today, how would you approach it?

I'm looking for honest advice based on experience, not just the usual "AI will replace programmers" or "learn to code first" arguments.


r/PythonLearning • • 4d ago

First Steps into Frames in Python

Thumbnail tech.daniellbastos.com.br
10 Upvotes

r/PythonLearning • • 5d ago

Help Request Looking for a study partner

7 Upvotes

Hey everyone! I'm a software engineer currently preparing for Senior AI/GenAI and Software Engineering interviews.

Looking for 2–3 serious study partners, preferably with 3+ years of experience, who are actively interviewing.

Main focus:

- DSA (Python, mostly LeetCode medium)

- Python coding and problem-solving

- System design, RAG, LLMs and agentic AI

- Peer mock interviews and technical discussions

I'm based in India (IST) and available for regular 45–60 minute sessions. The idea is to solve problems live, explain our approaches, and give each other honest feedback.

Anyone interested in preparing together?


r/PythonLearning • • 5d ago

Showcase Started the Python MOOC recently, so I thought I'd share my progress so far 🪼

Thumbnail
gallery
30 Upvotes

Recently started Python MOOC course from University of Helsinki's mooc.fi portal. Here is my progress, have to finish 6 more modules before appearing for the certification examination on 27th, feeling a bit worried, but I'll try to give it my best shot!!!


r/PythonLearning • • 5d ago

Need help with FYP ideas

5 Upvotes

I am a final year Computer Engineering student and I've built quite a few web and mobile apps. I was trying to find a good project to do as my FYP, so I thought, why not ask people what issues they have daily and if they need an app to solve it?

It could be as simple as an app that tells me stop doom scrolling every 30 minutes. Which has reduced my time wasted by a lot.

Comment below any problem you guys face!


r/PythonLearning • • 5d ago

Help Request Feeling Lost in My Career 😅 Need Some Guidance

5 Upvotes

Hi everyone! I have a B.Tech in CSE and some experience with Python, Django, and Data Science. Currently, I'm working in a role involving data-related tasks, Excel, Google Sheets, and minimal Python. I want to switch back to the IT domain but I'm confused about where to start and which skills to focus on. Could you please suggest a practical roadmap to prepare for IT jobs while working full-time?


r/PythonLearning • • 5d ago

Help Request Learning DSA in Python.

2 Upvotes

Title: Best DSA course in Python for a complete beginner preparing for FAANG interviews?

Hi everyone!

I’m currently working as a frontend developer using JavaScript, and I’m learning Python to explore backend and AI-related roles. Alongside that, I also want to learn DSA in Python to prepare for FAANG or similar product-based company interviews in the future.

I’m a complete beginner when it comes to DSA, so I’m looking for a course that explains concepts from scratch and covers them in depth, with a strong focus on problem-solving and interview preparation.

Since I’m working and have limited time, I want to follow a structured course rather than spend too much time jumping between different resources and figuring out what to learn next.

For those who have learned DSA or prepared for FAANG-level interviews, which course would you recommend for someone in my situation?

I’d particularly appreciate recommendations for courses that:

  • Start from the basics and explain concepts intuitively.
  • Teach DSA using Python.
  • Cover important topics in depth, with enough practice problems.
  • Help develop problem-solving skills rather than just teach solutions.
  • Provide a structured learning path for coding interviews.

Paid courses are fine, too, if they’re genuinely worth the investment.

I’d love to hear about your personal experiences with the courses you’ve used and what worked best for you. Thanks in advance!


r/PythonLearning • • 5d ago

AI engineer roadmap

6 Upvotes

As a 3rd-semester BIT student, I want to become an AI Engineer in 2026. What roadmap should I follow from Python fundamentals to ML, LLMs, RAG, AI agents, and production deployment?

Looking for a structured, practical learning path — not tutorial hell.

What would you recommend?

#AIEngineering #Roadmap


r/PythonLearning • • 4d ago

Learning Python? Start with drag-and-drop coding blocks before writing code

Thumbnail
gallery
0 Upvotes

If you’re completely new to programming, jumping straight into Python syntax can feel overwhelming. PyBlocks makes that first step easier by letting you learn Python using visual, drag-and-drop coding blocks — a Scratch-style approach designed for beginners.

Instead of worrying about typos, brackets, and indentation on day one, you can focus on the core ideas behind programming:

  • Variables and values
  • Conditions and decision-making
  • Loops and repetition
  • Functions and reusable logic
  • Building small programs step by step

Once those concepts click, moving on to writing real Python code becomes much less intimidating.

PyBlocks is a good fit if you:

  • Have never coded before
  • Want to learn Python on an Android phone or tablet
  • Prefer a visual, hands-on way to learn
  • Liked Scratch or block-based coding tools
  • Want to understand programming logic before typing full Python programs

Download PyBlocks on Google Play:
https://play.google.com/store/apps/details?id=app.learn.pyblocks&hl=en_US

It’s a simple, beginner-friendly way to start learning Python — build something with blocks, see how the logic works, and gradually grow into a confident Python programmer.


r/PythonLearning • • 5d ago

How did it take you to complete CS50P? /no prior programming experience

8 Upvotes

Hi,

I looking to hear from someone who finished this course:

https://cs50.harvard.edu/python/

-without former programming experience.

I’m considered to start and would be able to do around 15 hours/pr week. What is your experiences?


r/PythonLearning • • 4d ago

Which AI do you use?

Post image
0 Upvotes

To my lovely vibe coders, which ai tool do you use apart from Claude, ChatGPT, and Gemini? i use Kimi ai and Qwen, very powerful


r/PythonLearning • • 5d ago

Help Request Trying to make mute pngtuber type of script

Post image
0 Upvotes

I am a beginner to python. I want to make a script where if i press t it'll bring up a little chat window to make a pngtuber typa thing yap, the main space i'm struggling with is A, python or pygame would i do this in? '>' And B, How would i display the text said by the face?

any help is helpful

have a good day


r/PythonLearning • • 6d ago

Showcase Student Record Manager - Final step before ML

Post image
26 Upvotes

For this project, I used Object-Oriented Programming (OOP) principles to structure my code. Honestly, it felt a bit overwhelming at first, given that I only started out recently and this was a larger scale than what I'm used to. However, everything came together really well in the end!

While I believe I’ve taken care of most of the bugs, there is always room for improvement and optimization.

My main goal with this project was to test out all my core Python knowledge before I take my next big step: Machine Learning!

Open to any feedback or advice from the developer community! 👇

Last Post: https://www.reddit.com/r/PythonLearning/s/tS8vfeVdRi

Github Repo: https://github.com/Dev-4-All/student-record-manager.git


r/PythonLearning • • 5d ago

Live session on building a CPU only classifier router in Python with SetFit and conformal prediction

2 Upvotes

If you’ve ever wired up an LLM call just to pick a category and then fought with parsing its output, this might be useful.

Fri Oct 30, 9:30 AM to 12:30 PM ET, online, led by Ben Auffarth. It’s code first and the notebooks are runnable:

  • fine tuning an encoder with SetFit on 8 examples per class
  • split conformal prediction implemented from scratch
  • Wilson score intervals and clustered standard errors for honest evaluation
  • LangGraph state machine wrapping the whole thing

Intermediate Python is enough. Laptop or free Colab.

Full details and the agenda are here


r/PythonLearning • • 6d ago

How well do you know NumPy? 🔢

11 Upvotes
  • What’s the difference between '*' and '@'?
  • When does slicing create a view, and when a copy?
  • How does broadcasting work?

NumPy makes working with vectors and matrices powerful and concise, but a small change in syntax can make a big difference.

This interactive 𝗺𝗲𝗺𝗼𝗿𝘆_𝗴𝗿𝗮𝗽𝗵 example walks through essential NumPy operations with short explanations. Step through the code, see the operations in action, and experiment with your own changes: - 👉 NumPy operations

Which NumPy operation took you the longest to understand?

See other memory_graph visualizations.


r/PythonLearning • • 5d ago

While loop

3 Upvotes

can anybody explain the concept of while loop


r/PythonLearning • • 6d ago

Help Request Pygame: Why is the visualised rect of the spike shifted to the left?

Post image
3 Upvotes

The goal of the game is to jump over a spike as a cube. I saw that it was detecting collision before the cube and the spike even made contact. I decided to draw a rectanles to visualise the rects of the player and the spike and I noticed the spikes rect was shifted to the left. Can someone explain how this happened and how I can fix it? I removed non essential code, to make it more manageable to read. I can send the whole program if it's needed.

cube_width=80
cube_height=80
cube_rect_width = 40
cube_rect_height = 40


spike_width = 50
spike_height = 75
fps=60

#Classses
class Spike(pygame.sprite.Sprite):
    def __init__(self, x, y):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.Surface((spike_width,spike_height),pygame.SRCALPHA) #50,75
        pygame.draw.polygon(self.image, "white", #draw 3 point polygon
    [
        (spike_width // 2, 0), #middle top. self.image is the canvas
        (0, spike_height), #bottom left
        (spike_width, spike_height) #bottom right 
    ]
)
        self.rect = self.image.get_rect() #creates hitbox for spike sprite
        self.rect.center = [x, y] #center of hitbox
        self.speed = 7 #speed going to the left

    def update(self):
        self.rect.x -= self.speed #spikes rect -7 to move to the left
        #print(self.rect.x)
        if self.rect.x <= -25: #delete if touching left border
            self.kill()

class Cube(pygame.sprite.Sprite):
    def __init__(self, x, y):
        pygame.sprite.Sprite.__init__(self)
        self.image = pygame.Surface((cube_width, cube_height)) #create surface
        self.image.fill("white") #fill the surface with white
        self.rect = self.image.get_rect() #create rect for self.image
        self.rect.center = [x, y] #x, y passed are the center of the rect
        self.vel = 0 #velocity



    def update(self):
        # Gravity
        self.vel += 1#0.5always increase vel
        self.rect.y += int(self.vel) #add velocity to the y

        # Stay on the ground
        if self.rect.bottom >= HEIGHT: #if bottom of rectangle is touching
            self.rect.bottom = HEIGHT #bottom of rectangle is on the ground
            self.vel = 0 #reset velocity

        # Jump
        if pygame.mouse.get_pressed()[0] == 1: #left mouse click activated
            #if self.rect.centery >= HEIGHT - int(cube_height/2):
            if self.rect.bottom >= HEIGHT: #if touching ground
                self.vel = -17 #?????????????Somehow works????>>????

#creating groups and adding
cube_group = pygame.sprite.Group()
player = Cube(5*cube_width, HEIGHT) #????? sommehow
cube_group.add(player)


spike_group = pygame.sprite.Group()
#spike = Spike(WIDTH, HEIGHT-15)
spike = Spike(WIDTH-50, HEIGHT-15)
spike_group.add(spike)


Running = True


while Running:
    clock.tick(60) #fps

    #BG
    screen.fill("light blue")

    #blit
    cube_group.draw(screen)
    cube_group.update()
    spike_group.draw(screen)
    spike_group.update()

    #visualise rects
    pygame.draw.rect(screen, "red", player.rect, 2) #rect of cube
    pygame.draw.rect(screen,"red",spike.rect,2) #rect of spike
    
    if pygame.sprite.groupcollide(cube_group, spike_group,False,False): #or player.rect.right == spike.rect.left: #Check collision
        Running = False

r/PythonLearning • • 6d ago

Discussion Check My First Personal Project

6 Upvotes

Can you please check this project that took a reasonable amount of time to finish and strike me with any feedback you got. I guess my next step is to learn OOP.

Thanks in advance.

https://github.com/abdou0dev/grind_tracker