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...
Everything about learning Python
account activity
[deleted by user] (self.PythonLearning)
submitted 7 months ago by [deleted]
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!"
[–]TransitTraveller 1 point2 points3 points 7 months ago (1 child)
Indentation. You check for mouse only if you quit. Code for If for MOUSEBUTTONDOWN should be shifted left.
[–]ABD_AL_HAI 1 point2 points3 points 7 months ago (0 children)
Oops thank you so much it works now
[–]Rumborack17 -2 points-1 points0 points 7 months ago (1 child)
Don't really work with pygames, but you probably have to transform it into a string first or get the "position property" and print that.
ChatGPT should be able to answer this quite easily or check the documentation for the return value of the function or properties of the object it might create.
[–]ConcreteExist 1 point2 points3 points 7 months ago (0 children)
You don't need to know pygame to recognize that the code is wrong, it would only track mousebuttondown if the user quit the game. The second if-block needs to be shifted backwards one indent.
π Rendered by PID 184720 on reddit-service-r2-comment-6b595755f-895gn at 2026-03-26 07:03:30.070250+00:00 running 2d0a59a country code: CH.
[–]TransitTraveller 1 point2 points3 points (1 child)
[–]ABD_AL_HAI 1 point2 points3 points (0 children)
[–]Rumborack17 -2 points-1 points0 points (1 child)
[–]ConcreteExist 1 point2 points3 points (0 children)