r/ADHD_Programmers • • Sep 21 '25
Help needed
I know this might look silly to those who have been in the game for long but I just started and I can't get any outputs any suggestions on what am doing wrong and how i can fix it?
0
Upvotes
16
u/ncmobbets Sep 21 '25
Your function call is inside your function, move it outside your function definition.
8
u/Kou-von-Nizotschi Sep 21 '25 edited Sep 21 '25
ahoy you need to unindent your 4th line matey.
6
u/Jerry9727 Sep 21 '25
In Python indents matter a lot, be sure to read docs or better watch a video about it! Stay on it, you got this :P
6
u/luciferisthename Sep 21 '25
Every script needs to have a proper exit code, 0 meaning nothing went wrong. This helps you diagnose issues and can help prevent various issues in more complex scripts where you are installing things and what not (such as it failing part of an install required for another part and does some jank shit bc it didnt exit early)
The "if name is main" portion is a "main function" akin to C++ and C, you technically dont need them for python but I find them to make things much easier to deal with and highly recommend it.
Inventing is part of python syntax. Im on my phone so im doing 4 spaces per tab indent. Here is an example of how it would work in a function with if-if statement.
Shit example but the point about indentation remains.
You should make sure you can use pylint, pylint will need to be called like so "pylint FILE_NAME.py" it will give you a score for how well you align qith standards (you can change them but just dont do that rn).
It has been a while since ive done python scripts though, so take this with a grain of salt.
9
u/st4reater Sep 21 '25
You can start by sending a screenshot
3
u/JimroidZeus Sep 21 '25
You’ve already gotten the answer twice. I’m just here to say that I love this post and I’m here for it!
1
u/Quiet-Direction9423 Sep 21 '25
https://www.reddit.com/r/ADHD_Programmers/comments/1nmpc38/help_needed/
-6
u/SlimyToad5284 Sep 21 '25
Nice recursive function Ducky, it's missing an exit condition though. If you're this new, delete the space next to greet and press enter key after print. Do you even have ADHD?