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

SOLVED: Day 2: Checkpoint 1

Forums > 100 Days of SwiftUI

Hi all,

I am very new to development. I believe I successfully coded this first checkpoint.

let temperatureCelsius = 32.0

let conversion = temperatureCelsius * 9 / 5 + 32

let temperatureConversions = " The temperature in celsisus is (temperatureCelsius)° and the temperature in Farenheit is (conversion)°. " print(temperatureConversions)

Does this look ok?

2      

Welcome to the Forum. Your code looks great! But you'll need to use the Code button at the top when you insert code here. It's the fourth button along so that when you insert your code to the forum your code looks like this:

let celcius = 32.1
let fahrenheit = "\(celcius * 9 / 5 + 32)"
print ("Fahrenheit: \(fahrenheit)° Celcius: \(celcius)°")

It makes it MUCH easier for us to read and some characters may not come across properly if you don't do the insert code button. Use the preview button if your'e not sure. Looking at your code on here I think some of your backslashes are missing when you did string interpolation. I'm sure you would not have missed that in the real code.

Keep going. You'll do well!

2      

Thank you so much for the quick response. I'm on Day 3 now and your response really helps with motivation.

Thank you again!

2      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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.