ternary statement
Triecie77 (1)

Write a one line ternary statement that sets your AC's isOn property to true when the temperature is greater than or equal to 75, and sets it false in all other cases.

Print your isOn property to pass the tests.

var temperature: Int = 73 <-- This is the sysstem had this solution
set already
var isOn: Bool

let temperature >= 75

print("isOn")

You are viewing a single comment. View All
ash15khng (480)

1) What language is this?
2) What is "set already"?

AlessandraWhitl (0)

@ash15khng it's swift - its for a class I am assuming (because im taking a class rn and was just given that to figure out and im stuckkkk (also very new to coding so i just feel dumb lol)

alope1 (1)

@AlessandraWhitl is this for the iOS development class? If it's one of the assignments for week1 I can help. I was stuck on this very same one and figured it out.