iOS Swift Basics Swift Operators Working With Operators

Task 1

Still won't let me move to task 1

  • anything ?
operators.swift
// Enter your code below
let value = 200
let divisor = 5
let isPerfectMultiple == 0

let someOperation = 20 + 400 % 10 / 2 - 15
let anotherOperation = 52 * 27 % 200 / 2 + 5

// Task 1 - Enter your code below
let result = value % divisor

// Task 2 - Enter your code below
let isPerfectMultiple = "result"

1 Answer

For the first Task, you are correct. For the second task, you have duplicate "isPerfectMultiple" constants, so delete the first one.

// Enter your code below
let value = 200
let divisor = 5

let someOperation = 20 + 400 % 10 / 2 - 15
let anotherOperation = 52 * 27 % 200 / 2 + 5

// Task 1 - Enter your code below

let result = value % divisor

// Task 2 - Enter your code below
let isPerfectMultiple = result == 0