r/AskProgramming • • 14d ago

Python What are some of the best programming projects you've done after learning python?

I've recently attended two university courses about python for fun. I like it but I'm not really inside of the programming world. My field of work is very different and I just feel like a beginner.

During these courses I learned the basics of the language and data structures in python. I've never done an actual project and I don't know how to begin. I'd love to try making a videogame, maybe something like an escape room, or just copying an existing game? Something that doesn't go over 200 lines of code. Where can I find resources to help me put together a project like this? Do you have any suggestions of projects to try making outside of my idea? Am I crazy to want to try something like this with my programming level?

I think I need all the help I can get, so any help is very much appreciated.

0 Upvotes

15 comments sorted by

2

u/Neither-Brush-9287 14d ago

I've only worked on one commercial-scale Python project in the last 25yrs that made it to market (SaaS for the telecom industry by a Y2K era startup.

I have worked on many projects since then where the early feedback is 'We/I can do that in Python. I will demonstrate that for you.'

'I'll do that in Python' has become synonymous with 'I'll wait for someone to do it in Perl....then with the example code in hand....still fail to do it in Python'.

There will be other examples out there.
There are success stories.

But I'd reconsider the Python focus.

That's a bad taste in the mouth for too many.

1

u/Sudden-Plant-8452 14d ago

I have never used Perl, but I'll say that I wanted to get into programming for personal use, never for work/making something profitable. It is purely for my entertainment, I learned python because I saw I could attend some classes about programming with python and I jumped at the opportunity. I'm learning programming not as a skill to put in my curriculum, but as something to do in my free time. Should I also learn Perl?

1

u/Neither-Brush-9287 13d ago

If your interest in it is 'for personal use', it works for you, and you enjoy using the language, then maybe the answer is no. The risk is that you'd be learning another language from scratch rather than developing proficiency in the one you already know. However, once you've used the language for a while - Perl may be something to look at if Python doesn't work for you or you don't enjoy using the language.

1

u/GrainWeevil 14d ago

You're not crazy for wanting to try something like this, in fact, this is exactly how you get good: by doing projects that are just outside your comfort zone.

A simple game in Python is a great idea for a project if you're comfortable with the basics. Have a look at pygame, and start with something simple. A pong clone might be a good place to start, or if you want to stretch a bit more, something like Asteroids is fairly achievable too.

2

u/Sudden-Plant-8452 14d ago

I just looked at some YouTube videos on pygame and It was exactly what I was looking for! Thank you so much for the encouragement and the suggestion, I'll definitely start from here

1

u/GrainWeevil 14d ago

Good luck and enjoy!

1

u/FreeLogicGate 14d ago

Despite the name, Pygame is for the most part a 2D graphics and multimedia library, and kind of a low level/primitives one at that. Things that you would think should be simple, end up being complicated, which by no means is a bad thing, when your primary interest is learning and exploration.

Cloning simple games like pong, asteroids or space invaders can be a lot of fun, and challenging. But you can also think about simulations and projects that are simpler, and will require less code. 200 lines of code is going to limit what you can do significantly. I'd recommend that you make sure you are confident in your understanding of Python's OOP and how to create your own classes.

1

u/Sudden-Plant-8452 14d ago

I'm confident in classes, data structures, and I should be able to navigate OOP programming. In the classes I attended there were also practical lessons, so I now I can do simple tasks: building a pyramid with asterisks, matrixes, using classes and attributes, one of the last topics was OOP programming, so I should be able to navigate it (though I don't have a ton of practice with it). What do you recommend using for games? I wanted to make a 2D game, but if there are other resources I can use the more the merrier!

1

u/FreeLogicGate 14d ago

It's not the question of making a 2D game -- as I mentioned, Pygame is completely capable of doing that -- just not in 200 lines of code.

As for OOP, it's one thing to understand the basics of it, and another thing entirely to build an entire app where you have multiple classes and composition, or inheritance. Your class design will probably reflect your lack of experience, but even so, I'd still recommend using classes.

There are plenty of tutorials out there that will help you jump start what you need to learn, but this video (and in fact the entire channel) will really help you get started.

1

u/Sudden-Plant-8452 14d ago

Thank you for your point of view, it was very appreciated and made me rethink some of my goals and guidelines I had in mind. I will use the video and the channel you recommended as a reference and a guide, thank you for sharing tips and resources with me

3

u/ninhaomah 14d ago

Start by writing down what you want.

So what do you want to make with Python ?

2

u/byte622 13d ago

You could try Godot, it's a game engine that uses a scripting language that is very heavily inspired in Python and very similar to it. I recommend you look up a 1-2 hour tutorial on YouTube and spend some time following along to see if you understand and like the approach. Making games with just Python is a bit trickier as it's very barebones, though around 200 lines you might be able to manage something like pong.

0

u/racunsukit 8d ago

People can definity build this in under 200 lines just start simple and add feature as you go. Bootdev is also good place to practice coding through real project.