I did exercise 6. I skipped 5, actually I think I started it pretty much, but I decided to come to this one.
Here I had to enter the logs and see the occurrences of the events, only 'ok' and 'fail'. If there were failures, it would show how many there were.
I even had the general logic, the code was well structured, but I was trying a defense loop right at the beginning of reading the user input. It had to be only ok and fail, so it was becoming an infinite loop. Actually, I wanted to do this input validation part: it can't be empty and only allows the strings I mentioned
Then I researched and looked at some things until I put a piece of the code into Chrome and that overview created by AI appeared and simply gave me the input block ready… I was using:
if len(status) < 1 or any(resultado != permitidos):
# logic was using while True
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.