You are browsing as a guest. Sign up (or log in) to start making projects!

1h 30m 50s logged

This one was trickier. I need to improve how I use functions and keep variable scope in mind.

This new file adds modularity to Exercise 7. It contains functions for all the program’s processing tasks statistics, anomaly detection, results, status, displaying the report, and generating the report file. The part involving the file output was throwing an error because it didn’t recognize the total variable. I tinkered with it for a while, and since I’m using the Antigravity IDE, I decided to hand the problem over to the Agent, it basically changed the code to use len(dados) as a parameter (I really should have thought of that :| it was pretty simple, but I just got stuck).

In the end, it was generating two files: one in the script’s directory and another in the directory where I was running it. (I use a "Run" extension (exactly Code Runner, so I just click it and it executes the file—whether it’s compiled or just the source code, since it’s an interpreted language.)

0
2

Comments 0

No comments yet. Be the first!