r/AskProgramming 1d ago

Python Help Practicing Python

Hello!

I'm a first year Computer Science student learning how to program. The language we are going to be learning in my class (for first semester anyways) is going to be Python and I was wondering if anyone has any ideas on how I could practice python in my own time? Programming is something I am deeply passionate about and want to do good at, so I'm hoping I can get some help with this! :)

2 Upvotes

12 comments sorted by

1

u/Whole-Chest90 1d ago

I'm about halfway thru my CompSci degree here too. Still learning the coding on my own, as the bulk of what you'll learn is not necessarily the coding.

I've been using w3schools courses and exercises. It's free. Good luck.

1

u/itsjustmegob 1d ago

Congrats on starting your programming journey! I’d say the best practice is to choose a project in some domain you’re interested in that’s semi-ambitious, but not too ambitious. One of my first big projects in college was building a “beer pong point-tracking” app. I mean it’s stupid, but it was fun, and it kept me motivated. However, if you’re a true novice, such a project might need to wait until you’ve gotten a feel for some of the fundamentals. There’s lots of online courses and YouTube videos - I’d say just start googling and sample some of this content until you find something that clicks with you. Or ask chatgpt/claude to teach you - honestly that might work very nicely these days

1

u/johnpeters42 1d ago

Advent of Code / Project Euler. Some of the earlier ones are pretty straightforward exercises. (The later ones require knowledge of more efficient algorithms/formulas, don't worry about those unless you're feeling particularly ambitious.)

1

u/ninhaomah 1d ago

Deeply passionate ?

I don't mean to sounds... Whatever it sounds but if you are that deeply passionate about something , you should be doing wayyy before the class starts.

I was doing C and IRC scripts before 15... Was trying to hack the IRC servers back then. Oh well...

1

u/itsjustmegob 1d ago

Wait you’re *the* trinity? Who cracked the IRS D-base? I just thought…you were a guy

2

u/ninhaomah 1d ago

No.

I am Morpheus.

The pharmacy guy... You know ? The guy who went around giving pills to the sick people.

Neo was definitely sick. He was late for work but still running around using banana phone.

1

u/itsjustmegob 1d ago

Neo should have just grabbed both the red and blue pills out of Morpheus’ hands and chugged em both down right in his face

1

u/JackTradesMasterNone 1d ago

Start low - understand the commands and what they do and how the language is structured (syntax). Then, you can find simple things to do. Easiest one that can balloon up
Is some sort of text-based program - print something to the console and take an input and act on it. Then add error handling. Then build out the logic. Introduce “randomness”. And so on.

0

u/Traditional_Vast9419 1d ago

HackerRank's Python section is a great place to start.

1

u/golden_guinea 1d ago

Build a command line tool that solves a problem you have right now. I wrote a script to rename my class notes because doing it manually was tedious and that taught me more than any tutorial.

1

u/JacobStyle 1d ago

The first step is getting your development environment set up so you can write and run Python code on your own computer. Then make a little "hello world" program to make sure everything is working. Then do a little calculator program or something to practice working with user input, variables, operations, and conditionals.

2

u/StructuredChess 1d ago edited 1d ago

Level 1: Give me the sum of the reciprocals of the first 100,000 natural numbers but every time you reach a multiple of 69 you divide the running sum by 420

Level 2: Make a function that takes three numbers (a,b,c) as inputs and paints the graph of f(x)=ax2+bx+c and returns the solutions of f(x)=0

Level 3: Implement the dichotomy search algorithm to approximate the zeroes of any one-variable function.

Level 4: Implement the gradient descent algorithm to approximate the minimum values of multiple-variable functions.

Level 5: Build a fully-working 2-player chess app.

Level 6: Add an AI opponent to level 5.

No AI. No StackOverflow. Struggle on your own. Nobody cares what the sum with the weird 69-420 rules is, what matters is that you reason through the problem.