Fun and Games with PowerShell

My daughter has been learning Python which I know nothing about (I’m not a developer). I took a look at one of the programs that she’s been working on and said I don’t know Python, but I can create something better than that in PowerShell.

I hadn’t previously used a “do until” loop in PowerShell so I decided this was as good as an excuse as any to use one since the loop has to run at least once anyway and it gave me a chance to learn something new.

I would like to thank Jason Helmick for the tip on using the .NET Framework instead of COM for the speech as well as Rohn Edwards who originally wrote a version of the code shown below that used COM which I translated into using the .NET Framework as well:

µ

2 Comments

  1. Carl

    Nice and easy to follow for a beginner like me, thanks for posting Mike

    Reply
  2. DONALD WILKERSON

    By starting with half of the number you will always get it. So, start with fifty then half of that depending on direction and reduce from there with 1/2 each time

    Reply

Leave a Reply

%d bloggers like this: