Defining Functions and While Loops

I am in desperate need of some help here. I’ve looked online, asked around, even had my boyfriend (who is actually a software developer) sit down and try to explain, and I am still absolutely lost in regards to defining functions and while loops. They seem to be the first times in the Discovery process that variables and parameters aren’t clearly defined (my boyfriend said something about an implicit understanding with the computer) and I am SERIOUSLY beyond frustrated. Can anyone please help me?

Never mind. Problem solved.