BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>

Checkpoint 1: step 1 unclear, it turns out

Forums > 100 Days of SwiftUI

Reading step 1 of Checkpoint 1 "Create a constant holding any temperature in Celsius." I assumed that "any temperature" meant getting a value from the user/keyboard.

After spending, erm, some time trying to sort that I looked at the hints and discovered that what it meant was "Choose a temperature in Celsius and create a constant holding your chosen temperature."

A 3-minute project rather than a fruitless hour-long project.

   

The key words is Create a constant, so you end up with let something = any temperture

let celsius = 50.0

or

let celsius: Double = 50

Then number two convert that into a Fahrenheit

let fahrenheit = celsius * 9 / 5 + 32

Then print it

print("\(celsius)°C is equal to \(fahrenheit)°F")

   

Yes, I did complete the exercise correctly, but I still contend that the phrasing "Create a constant that can hold any number" is confusing—at least once, so far. Different wording would eliminate the confusion.

As programmers, precise language is critical. As a teacher, the same applies.

   

[in reference to an apparently deleted comment]

It is, in fact, a leap, but good communication doesn't assume "people won't leap." Many people taking this course have extensive coding experience and aren't necessarily going to assume this is a baby step.

I'm not saying "There is no other way to interpret this." I'm saying it's ambiguous without good reason.

   

Save 50% in my Black Friday sale.

SAVE 50% To celebrate Black Friday, all our books and bundles are half price, so you can take your Swift knowledge further without spending big! Get the Swift Power Pack to build your iOS career faster, get the Swift Platform Pack to builds apps for macOS, watchOS, and beyond, or get the Swift Plus Pack to learn advanced design patterns, testing skills, and more.

Save 50% on all our books and bundles!

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.