Posts

Showing posts with the label sqrt

Ray Wenderlich Course Part 8 (up to lesson 70)

Image
Second entry today - woohoo! Cracking on with Ray's guide to all the key language features of Swift. First up will be control flow for 8 lessons then 9 for functions and optionals. I want to get at least all of those done in this entry. Hopefully there will be some more challenges as these undoubtedly help me understand the information at a greater depth. I'm going to be going through the main info at a quicker speed: 1.5 x again. Ok here we go! While Loops var i = 1 while i < 10 {          print ( i )          i += 1 } In this example, numbers from 1 to 9 will be printed.  So the difference with repeat loops is that it executes the code the first time, no matter what... repeat {     print ( i )     i += 1 } while i < 10   Ray says that the first one is used generally more.  repeat {     print ( i )     if i == 5 { ...