I have tried to define my functions for each task but when I run the test, I still get errors.
Can someone help me with this please?
For e.g.:

What does the error say?
If you’re going to share code, please share it using codebooks so people can actually copy it!
You should post in the subforum of the specific language you’re using.
(Ok I have to ask - is copy-pasting your code more difficult than getting and uploading a partial screenshot?
)
We’re programmers, lets benchmark it!
-
screenshot
- launch the screenshot/snipping app.
- click the button to select the frame
- click the copy button, if the app does not automatically copy it
- paste into discourse/discord
-
code
- select the code hit Ctrl/Cmd+c
- in discourse/discord, type 3 backticks, paste, type 3 backticks.
One is more mouse-y, one is more type-y.
BUT, joking aside, it’s not about how hard it is for you, it’s about how easy it is to read (consider sight-impaired people), and how easy it is for people who want to help you who can’t copy your code and try to reproduce/fix the bug. You (the generic “you”, whoever is asking for help) are asking strangers to volunteer their time to help you: make it easy for them.