Complete the code to create a tuple named 'person' with a name and age.
let person = ("John", [1])
The tuple holds a name and an age. The age should be a number like 30.
Complete the code to access the first element of the tuple 'coordinates'.
let coordinates = (x: 10, y: 20) let xValue = coordinates.[1]
To get the x value from the tuple, use the label 'x'.
Fix the error in the code by completing the tuple declaration correctly.
let result = (status: "OK", code: [1])
The code expects an integer for 'code', so use 200 without quotes.
Fill both blanks to create a tuple with named elements and access the second element.
let point = ([1]: 5, [2]: 10) let yValue = point.y
The tuple has labels 'x' and 'y'. We use 'y' to access the second element.
Fill all three blanks to create a tuple, access its elements, and print the name.
let person = ([1]: "Alice", [2]: 28) let name = person.[3] print(name)
The tuple has labels 'name' and 'age'. We access 'name' to print it.
