Menu
Coddy logo textTech

Recap - Initialize Variables

Part of the Fundamentals section of Coddy's Swift journey — lesson 10 of 86.

challenge icon

Challenge

Beginner

Write code that initializes the following constants:

  • k with the value 88 (note: lowercase 'k')
  • PI with the value 3.14 (note: uppercase 'PI')
  • name with the value "Bob"

Make sure you use the exact variable names and values. Remember:

  • Swift is case sensitive! (kK)
  • String values must be enclosed in double quotes: "Bob" not Bob
  • Use let to declare constants

Try it yourself

// Type your code below


// Don't change the lines below
print("k = \(k)")
print("PI = \(PI)")
print("name = \(name)")

All lessons in Fundamentals