Category: checkpoints
-
Direct from page: To check your knowledge, here’s a small task for you: create a struct to store information about a car, including its model, number of seats, and current gear, then add a method to change gears up or down. Have a think about variables and access control: what data should be a variable…
-
The task was to take an array of numbers and parse it Here’s my attempt, it works but I’m not sure its 100% correct I had a thought about passing in an array of function references to using then iterating over that array within doNumberStuff. Maybe I’ll try that at a later date. It was…
-
Write a function that takes an integer from 1 to 10000. Find the square root without using the sqrt function. Should include the error handling we’ve been working on. My solution
-
Loop through a range of 1 to 100 inclusive and write: Note: I didn’t bother with reading the hints, but a good tip was to use the isMultiple(of: n) Onward.
-
Create an array with duplicate items, then count them. Convert the array to a set, then count the items. Checkpoint Thoughts: Coolness.