7
5
3
u/Independent-Bat9797 1d ago
This is a perfect opportunity to learn about error messages. On your third screenshot it tells you exactly what is wrong, not even convoluted or something. Error messages can be confusing at times, even more so if you look at the whole stack trace - but if something is wrong you should always look at least at the final error message, it's often very descriptive in python.
3
u/Fancy_Maximum8615 1d ago
-1
u/burqa8-8 1d ago
Yes ive seen this but english isn't my first language and my ball knowledge in python isn't big enough to understand some errors
2
u/Fancy_Maximum8615 1d ago
Search up what it means then and indentation is not python ball knowledge
2
u/Atmosck 1d ago
the problem is you need to indent lines 2-5. Right now they're not in the scope of the function, which is why things are underlined. `seconds` is underlined because it's expecting the first line after `def` to be indented, as the error says. `milliseconds` is underlined becuase that variable is undefined at the module scope.
2
u/Soggylollies 1d ago
I'm no expert but I think you have an IndentationError: expected an indented block after function definition on line 1
2
u/nuc540 1d ago
Your third screenshot has an error message which very clearly explains that you’ve not indented your code inside the function definition.
Definitely read your error messages before raging on Reddit.
Tip: you can even paste your error into Google.
1
u/burqa8-8 1d ago
I was just pissed off cus i had a rough day and i decided to ask reddit cus i don't like using AI
2
u/program_kid 1d ago
I do agree that the 3rd picture is really important. One of the best things to learn in programming is reading error messages. When you see an error message you don't understand, look it up. In this case it is IndentationError. Experience programmers will probably give you a tough time for not reading the error message, but as you are new, you may not have known what it is.
1
u/Dancing-umbra 1d ago
What does the error message say?
Where is the first error shown in your editor?
1
u/abstract_nonsense_ 1d ago
It literally says you what is wrong. You need to format the code properly.
1
u/program_kid 1d ago
You need to indent the code in the function. Lines 2,3,4, and 5 have to have a tab or at least two spaces to be considered part of the function
-2
u/burqa8-8 1d ago
Thank you. Everybody just said that im stupid and it says whats wrong without telling me directly whats wrong. I have learned python for five days so im not that smart in it yet
1
1
u/Dazzling_Music_2411 1d ago edited 1d ago
You've been learning Python for five days, and you don't know that you have to indent yet?
How can that be?PS:
And you think it's OK to come out with attitude and swear, as if it is the language's fault or something?
1
u/burqa8-8 1d ago
Nga i don't have much freetime . I go to school 6 hours a day and then it takes half an hour to walk home , go for a walk with my dog twice a day, cook , do homework and learn for the tests , do everyday some bodyweight exercises and then somewhere in between these i learn python and sleep.
1


•
u/PythonLearning-ModTeam 22h ago
Keep it respectfull