Sunday, February 24, 2019

Difficult Pages and New Concepts

Unit 1, Lesson 4:
  • Page 4 has some intricate logic but you should be able to work it out.
  • Page 7 uses switch statements with ranges. This is a new concept. Explanation is in the book.
  • Page 8 introduces the ternary operator. This is new. Explanation is in the book.
  • Page 9 also uses the ternary operator.

Unit 1, Lesson 6 will introduce you to debugging, breakpoints, and the debug console.

Unit 1, Lesson 8 has two different simple apps you will make.

Unit 1, Guided Light App will have you write and change code and change the UI to the best possible.


Unit 2, Lesson 1, Page 5 - You need to pay careful attention to the instructions, especially regarding the use of case sensitivity.

Unit 2, Lesson 2, Page 4 - The pacing function may be difficult for you to formulate. You want to compare the fraction of the distance completed (current distance / total distance) with the fraction of the time used (current time / goal time). If the distance is farther along than the time, then you will beat the goal time.

Unit 2, Lesson 2, Page 6 - This has another pacing function. To calculate the pace, remember that

current distance        total distance
-------------- = ------------
current time             total time

Or, you could look at it this way:

current distance / total distance = current time / total time
current distance        current time
-------------- = ------------
total distance             total time

You want to calculate the total time based on the other three. (This would tell you, for example, how many minutes it will take you to run a mile.) Figure out the equation to determine the total time.

Unit 2, Lesson 3, Page 7 - I could not get the didSet functions to work without causing an infinite loop.

Unit 2, Lesson 3, Page 8 - Be aware, the willSet function behaves differently than the didSet function.

Unit 2, Lesson 4 introduces classes, which is an entirely new concept. Classes are similar to structures but they have some added capabilities, such as inheritance. Inheritance is an important concept for you to know if you plan to continue on in the future to Java or Android programming or AP Computer Science. We should probably do this lesson together instead of independently.

Unit 2, Lesson 6 introduces new uses of the for...in loop, such as indexes and key/value pairs. It also introduces while loops, which are an alternative to for...in loops.

Unit 2, Lesson 8 asks you to create two small apps and make them look nice, but you do not need to use constraints or auto layout, which will be in a future lesson.

Unit 2, Lesson 9 asks you to connect a tap gesture recognizer. The gesture recognizer exists only in the document outline, so you'll need to make sure it is open.






No comments:

Post a Comment