iOS Swift Basics Swift Operators Working With Operators

I am unsure of how to write out the result, and how to write the code to get a remainder.

Could someone help me figure out how to write the remainder code to get the result? Also for step 2 i know that I am supposed to use == but not sure how to format it.

operators.swift
// 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 = "The % of \(value) and \(divisor)

// Task 2 - Enter your code below
let isPerfectMultiple = "0 == \(result)"

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 46,099 Points

The challenge doesn't want you to specify any text. It wants the calculation using the variables provided. The first step uses the modulo operator:

let result = value % divisor

This is the remainder for value divided by divisor. The second step wants a boolean value that determines if the result is a perfect multiple. For this to be true result would equal zero

let isPerfectMultiple = result == 0

THank you! I was definitely over thinking it.