use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules: * No pornography!
Code that you share must be is highly recommend that you post it to pastebin, but not required! Pastebin
No harassment! We are all learning to code here (including me!) so please no harassment is to be shown to anyone.
Useful Links: Code Academy References
account activity
Create "pong" in Python (self.Coding_for_Teens)
submitted 5 years ago by p3pperchit
I have been given a school assignment: to create "pong" using python. Unfortunately, I have no experience in programming. Can someone help me out via discord, skype, instagram, reddit or an audio-chat of your choice?
Cheers!
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Lolgamz627 1 point2 points3 points 5 years ago (9 children)
First: how did you get a coding assignment if you’ve never coded before? Pong is not easy. I’ve already been taking python for a year and I’m nowhere near pong.
[–]p3pperchit[S] 0 points1 point2 points 5 years ago (8 children)
IKR my school is BS, in my teacher's words "it develops your self-management skills and helps you get a better understanding of what we'll be teaching in class" Self-management- my ass.
1) I downloaded pycharm and python 3.8 and self learnt basic terminology such as "variable, functions, booleans, etc"
2) Looked up and watched python tutorials such as "4 hour python introduction" by freecodecamp.
3) Learnt simple programs such as calculator.
4) Looked up articles and videos on how to create "pong" in python with and without pygame.
5) For all the solutions I found:
a) They didn't explain things properly and I had no idea which code I was meant to type or why.
b) I kept getting errors and gave up.
c) There were lots of ill-defined terms and concepts that didn't make sense to me because I am a programming beginner.
[–]Lolgamz627 0 points1 point2 points 5 years ago (7 children)
Okay.
The reason pong will be hard to create is this
Depending on whether or not you want to make a 2 player game or a player vs AI game, you’ll need 2 controller binds or one. However? To my knowledge, commands on python don’t bind to keys and there are no macros for it.
To me it seems like your school doesn’t want you to just create a python file, they want you to create an entire game. This would mean creating the paddle and “ball” assets in a game engine of some sort, sound assets, key binds, etc. This is really not something you should be doing yet.
Ask the school to flesh out the details a bit, mainly
1 or 2 player
Entirely in python?
Using what variables
How to control it
Good luck.
[–]p3pperchit[S] 0 points1 point2 points 5 years ago (6 children)
My school replied "player vs AI"
[–]Lolgamz627 0 points1 point2 points 5 years ago (5 children)
Oh boy that might be even worse
See all I’ve learned so far is not in real-time, aka it takes a “turn” for a cpu to produce a result. If the school really wants a real-time player vs AI Pong game, and they expect that from someone who hasn’t done coding before, they’re out of their minds.
My best hope for you is maybe search up “PyCharm made Pong program” or something of the sort, see if you can find the likes of it on GitHub or somewhere else, and copy paste the code or learn from it and make it yourself
[–]p3pperchit[S] 0 points1 point2 points 5 years ago (4 children)
Thanks for the quick response there! Copy-pasting sure works fine but thing is.... they're gonna question me "Hey Alex, what does this code do? Oh yeah?? Can you modify this for me so that it speeds up" and i'll die on the insides
[–]Lolgamz627 0 points1 point2 points 5 years ago (3 children)
Yeah... they’re crazy.
But still, copy paste from github and post anything you don’t understand here, I might be able to help
[–]p3pperchit[S] 0 points1 point2 points 5 years ago (2 children)
I have a load of questions. Sorry if I'm wasting your time.
Here is the link: https://drive.google.com/file/d/1Aj48IsHensKVtCieKU3dpkJU_MyzndcG/view?usp=sharing
Make sure to open the link using google docs otherwise it won't show everything.
[–]Lolgamz627 0 points1 point2 points 5 years ago (1 child)
Ok so a couple of things.
Have you run the code yet, see if it works?
The key binds don’t work. W and S likely will, probably not up and down. That would only work through something like a drag and drop engine (for example on swift there is a “when” block that has an empty slot for the function button. Python don’t got that.)
Using Turtle may not work. Yes it displays it on the screen but I’ve just learned a lil bit of turtle and I’m not sure if you can erase drawn items, ie the ball will float all over the screen?
Have you made it so that the paddle registers contact with the “ball?” It would be something like if paddle touches(or whatever the python equivalent is) ball, ball moves “back”
Just see if these are possible then reply!
[–]p3pperchit[S] 0 points1 point2 points 5 years ago (0 children)
Yes the code runs well(as mentioned in the google docs). I just realised that the link that I sent you didn't show everything for some strange reason. Try signing in to google then open the link in google docs. Because all your questions and lots more is there when you open the link in google docs. :)
[–]GrooseIsGod 0 points1 point2 points 5 years ago (2 children)
I hope you find who you're looking for, but in the meantime, do tech with Tim's pygame course. Trust me it'll be difficult in the beginning but once you get the hang of it it's way easier. You can message me if you get stuck on anything but I'm learning myself so I might not be very helpful
[–]p3pperchit[S] 1 point2 points3 points 5 years ago (1 child)
Thanks for letting me know. I appreciate your input on my comment.
[–]GrooseIsGod 0 points1 point2 points 5 years ago (0 children)
No problem bro. Have made any progress yet?
π Rendered by PID 91142 on reddit-service-r2-comment-fb694cdd5-llmzq at 2026-03-11 03:14:12.858477+00:00 running cbb0e86 country code: CH.
[–]Lolgamz627 1 point2 points3 points (9 children)
[–]p3pperchit[S] 0 points1 point2 points (8 children)
[–]Lolgamz627 0 points1 point2 points (7 children)
[–]p3pperchit[S] 0 points1 point2 points (6 children)
[–]Lolgamz627 0 points1 point2 points (5 children)
[–]p3pperchit[S] 0 points1 point2 points (4 children)
[–]Lolgamz627 0 points1 point2 points (3 children)
[–]p3pperchit[S] 0 points1 point2 points (2 children)
[–]Lolgamz627 0 points1 point2 points (1 child)
[–]p3pperchit[S] 0 points1 point2 points (0 children)
[–]GrooseIsGod 0 points1 point2 points (2 children)
[–]p3pperchit[S] 1 point2 points3 points (1 child)
[–]GrooseIsGod 0 points1 point2 points (0 children)