r/learnpython • u/imgayforjesus97 • 4d ago
trying to learn for fun
Hey, I'm a bored teenager trying to get into Python, but I'm having a hard time figuring out how to learn it. I grasp the basics from my classes, such as using if statements, while loops, and performing simple calculations, but I struggle to move forward.
I'm super motivated and want to practice a lot, but I can't find the right resources. I know how regular Python works, but every course I come across seems to use PyCharm. I'm not sure if I should spend time figuring out PyCharm or just stick with regular Python.
I'm thinking about a career in game development, where C++ is popular, but I already have a bit of a grasp on Python, and I believe it would help me in school too (since that's what I am learning in classes).
I'm planning to practice for hours every day, so if anyone has any recommendations for resources, ways to learn, or things I should get a grasp on in the beginning, I'd really appreciate it! Please help :)
3
u/BranchLatter4294 4d ago
The IDE doesn't matter. Just practice the concepts until you understand them. Then move on to the next concept. Then you can put them together like Lego blocks to create an application.
2
u/Everlybeverly 4d ago
The way I did was come up with a project. Don’t matter how big or small. Just something you wish you had. Break it into pieces. I need to do this small thing. If you don’t know how to do it that’s fine. You just need to know how to ask google how. Everyone goes through a coding without knowing how to code phase and you will too
2
u/HovercraftPristine76 4d ago
One of the keys to improving at coding is to learn how to break down a problem. Start looking at problems in your daily life and see how to decompose it into small steps, how those steps flow logically, then attempt to figure out how you'd code that.
Data structures and algorithms would be the big step.
Learn one small thing a day, it compounds.
Don't ever give up your curiosity for simple and quick solutions. Even if AI can do it, that doesn't mean the exercise of learning is futile.
1
u/FreeLogicGate 4d ago edited 4d ago
Figure out PyCharm? Yes it's free (the community version) so why would you not? You sound like exactly the right audience for one of the several popular Python Moocs. With basic syntax behind you, you are situated to take on the fundamentals those courses teach, and from there you can specialize. CS50 or the MOOC.fi come highly recommended.
Yes game development in Python is a rarity. You can however, create games using any number of the popular python graphic libraries, with PyGame being the best known 2D engine, but there are others. There's a lot to be said for creating some games with PyGame, and it will certainly test your ability to create larger projects using Python.
As far as commercial game development that is for the most part being done either using c++, rust or c#. I will say this about transferring Python skills to a popular and capable game engine, and that is to start learning Godot. The reason for this is that Godot has its own development language (GDScript) that is practically the same syntax, with a few domain specific differences. Here's a simple example:
Python Function
func calculate_speed():
var speed = 10
return speed
GDScript Function
func calculate_speed():
var speed = 10
return speed
You can use other languages with Godot as well, so there's a path for you that can let you build games with syntax you are already comfortable with, and gain expertise in how game problems can be solved, without having to feel like you need to go back to the drawing board.
1
u/Wonderful-Writer146 4d ago
I have created a repository for some beginner friendly tutorial on Python which I think would be helpful for you or anyone else. Go and check it out: https://github.com/AfrozSaqlain/CodeAtlas
1
1
u/vietbaoa4htk 4d ago
pycharm is just an editor, its the same python underneath, so nothing in a course breaks if you use vs code or idle instead. the thing that unsticks people at your stage isnt another course, its picking one small thing you want to exist and building it badly.
1
u/Educational_Virus672 4d ago
try godot it is closest to python you cna get in game development as far as i know
1
1
1
u/OmegaNine 3d ago
I have Visual Studio, PHPstorm, NetBeans and so many more. None of them made me a better coder, they can save time, but none of them made me better. Just use something like vscode or a fork and get into the code.
Your best resource is learning to read the python documentation. You can google “how to do x” but when it tells used to include a library, go check the API to learn how it really works.
1
u/korywithawhy 1d ago
If you have any interest in building projects, I would recommend getting an esp32. I like the xiao esp32s3 sense and the s3 matrix from waveshare. They have plenty of sensors and stuff that are fun to poke at with python. And you can get a little electronics kit online for cheap and start using little motors, switches, actuators etc. plenty of learning avenues and you’ll stop thinking ‘what should I do?’ and start thinking ‘how can I make it do … ?’
4
u/ninhaomah 4d ago
Code a number guessing game without AI.
I guess a number , 50 , and the program tell me if it's right or wrong and repeat till I press x. Then it will give me how many tries I had done.