<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello VicPiMakers Gang :)<div class=""><br class=""></div><div class="">I’m joining remotely from Thailand where a much-appreciated job has taken me these days .. but it’s a +14 hour time change from Victoria, so I haven’t managed to make any of the online meetings yet. I’m meant to be here until July, so hopefully I’ll get a chance to join in online at some point coming up.<div class=""><br class=""></div><div class="">Craig and Deid were kind enough to send me the last Coding Challenge though, and I’ve been enjoying some of the 2 week quarantine time here puzzling away on this fun task :) THANKS !!</div><div class=""><br class=""></div><div class="">So .. earlier on in the emails, someone said this seemed like a good opportunity to learn a new programming language. Lately I've had it in the back of my mind to check out ‘Swift' as I’ve got mostly Mac’s running at home (aside from tinkering with the Raspberry Pi and also a couple of Ubuntu VMs) .. so it seemed like a great opportunity.</div><div class=""><br class=""></div><div class="">I’m not finished quite yet but quarantine is coming to an end in a couple of days, so here’s my progress so far .. I’m done #7 .. stuck on #8 .. it did occur to me that there’s one number missing from the sequence which I think should be 118 .. not sure if the discussion has floated to the top as to whether this omission is a typo or not, but I think that including the number might make the sort process a lot easier .. just haven’t got to it yet :)</div><div class=""><br class=""></div><div class="">As for my first bits of learning Swift, the language seems mostly sensible, coming from a hobbyist level of C.</div><div class="">- Swift includes what seems a bare minimum of formatting requirements .. just some very C-like use of brackets, braces and parentheses.</div><div class="">- Indentation doesn’t seem to matter</div><div class="">- no line terminators are required</div><div class="">- Casting variables, calling functions etc. seem to be pretty sensible.</div><div class="">- The defining of the return type of a function is a little interesting with a “func name(arguments) -> returnType" format.</div><div class="">- The defining of variables is interesting .. ‘let’ = constants, ‘var’ = variables, and variables are automatically typed by the compiler, or if you like, you can cast them upon initialization.</div><div class="">- I had to dig around a bit to find the ‘ceil(float)’ function which is a sort of dedicated rounding process to force the .41 to round up. There’s also a corresponding ‘floor(float)’ function which always rounds down .. handy :)</div><div class="">- Within Xcode, I really enjoyed the fact that you can sort of type a something, anything, then add a dot, and a list of possibilities will present itself .. very nice for learning :) I’ll drop in a screenshot here. The red warning is only because I haven’t made up my mind yet in this case as to what function I actually need .. it goes away when warranted after you complete the function and arguments.</div><div class=""></div></div></body></html>