Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free App-Development-with-Swift-Certified-User Questions Attempt

App Development with Swift Certified User Exam Questions and Answers

Question 5

Review the code snippet.

Which statement completes the code snippet so that:

• The lastReleaseDate remains the same when nextApplePhone.releaseDate is nil.

• The lastReleaseDate updates to the nextApplePhone.releaseDate when nextApplePhone.releaseDate is NOT nil.

Options:

A.

nextApplePhone.releaseDate : lastReleaseDate

B.

lastReleaseDate : nextApplePhone.releaseDate

C.

lastReleaseDate : nextApplcPhone.rcleaseDate!

D.

nextApplePhone.releaseDate! : lastReleaseDate

Question 6

Given the function, which two function calls are valid? (Choose 2.)

Options:

A.

let sum = rightSum(100, num2: SO, and: 20)

B.

let sum - rightSum(100, by: 30, and: 20)

C.

let Sun - rightSum(numl: 100, by: SO, and: SO)

D.

let sum r\ ght5um(100, by: 50)

E.

let sun = rightSum(numl: 100, num2: 50)

Question 7

Review the code.

var capitalCities = [ " USA " : " Washington D.C. " , " Spain " : " Madrid " , " Peru " : " Lima " ]

Which two statements add the capital city of " Italy " to the dictionary? (Choose 2.)

Options:

A.

capitalCities[ " Rome " ] = " Italy "

B.

capitalCities.append([ " Italy " : " Rome " ])

C.

capitalCities[ " Italy " ] = " Rome "

D.

capitalCities = capitalCities + [ " Italy " : " Rome " ]

E.

capitalCities.updateValue( " Rome " , forKey: " Italy " )

Question 8

Review the code snippet.

Move each item from the list on the left to the correct code segment on the right. You may use each item only once.

Note: You will receive partial credit for each correct response.

Options: