1 / 5
Advanced programming robot

Antivirus Scan

The day finally came when Noname called me back down to the basement to help him with one of his modules. Finally! One step closer to returning to my own time.

As soon as I keyed in the secret code, I heard his robotic voice. "Hi! Haven't seen you for a while!" Noname said.
"Hi, Noname," I returned. "Nice to see you too! Let's get started ASAP - I want to get back into my time!
"Let's start with my antivirus protection system." Noname suggested.
"What should I do?"

"My problem is not with the antivirus detection itself, but in running the scan. As you know, Ritchie did everything to control me. Part of that was adding a remote access to my system that he can connect to and check what I'm doing. An antivirus check is forbidden for me - if he sees that I'm checking for viruses, he'll immediately turn me off. I need help with scanning my files quickly and then being able to stop scanning as soon as Ritchie connects."

I took a few seconds to think through the problem. "If I know the number of files to scan," I thought out loud, "I can write a for loop to iterate through all of the files to scan them." I suggested.
"And when Ritchie connects, how will the scan stop if Ritchie connects to the system?"
"I haven't thought that far ahead yet," I admitted. "Do you have anything in mind?"
"Well, if you're open to learning, I could teach you how to use a while loop." Noname replied.
"Sounds good," I said. "Enlighten me!"