Posts

Showing posts with the label types

Nick Walter Swift 5 Course - Part 1 (lectures 1 to 15)

Image
Well, this has been the worst effort for a long, long time! An entire month! There's no point fretting about it - that will not achieve anything. I've felt a renewed sense of wanting to achieve with coding. At this point, it makes sense to switch to a new Swift 5 course, as the language has been updated. It will also give me a chance to consolidate and ensure my understanding of the basics is solid. Then I will resume with Angela's course! So not a cop out. OK, let's get stuck in! Start Time - 14:00 Just looking at Nick's course, there are 6 hours of content here. Perfect for the next few entries - possibly just even the next couple of days' worth. A lot will be the basics, but that's fine. Intro/Installing Xcode - skipping through all these! Don't need the Linux/Windows ones either. Swift Basics This is going from absolute beginner, so rather than totally skipping through and onto Intermediate, I'm going to just do a general skim over. S...

EDU Course Challenges 1

So I don't feel quite ready to resume Angela's course! No, I've had a look through the other Udemy courses I've purchased and have decided to test out the challenges from the EDU one. I just enjoyed the last few so much that I want to get stuck in and apply what I know before I go back to Angela's. OK here we go! Start time - 20:39 Challenges for types etc. 1. Type this code in a playground: var num = 5 num.advancedBy(3) What is the result? We talked about advancedBy in connection with String indices. What does this result tell you about these indices? Do the .successor() and .predecessor() methods also work with Ints? Does the .predecessor() work when num is 0? I've never actually come across advancedBy before. It will be interesting to see if the latest Xcode even recognises it! So I assume the answer will be 8! num . advanced (by: 3 ) Indeed, the syntax has chosen since this EDU course. No bother, I fixed it easily and the answer...