UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

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.

2      

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")

2      

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.

2      

[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.

2      

Hacking with Swift is sponsored by RevenueCat

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

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.