Philips Interview Question

Powershell code for some random function.