iOS Swift Basics Swift Operators Working With Operators

amit singh
amit singh
4,201 Points

let value: Double = 200 and let divisor: Double = 5 let result = value%divisor, this is not working,error?

let value: Double = 200 and let divisor: Double = 5 let result = value%divisor, this is not working,error?

operators.swift
// Enter your code below
let value: Double = 200
let divisor: Double = 5

let result = value%divisor

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

// Task 1 - Enter your code below
someOperation == 0.0
let isPerfectMultiple: Double = someOperation


// Task 2 - Enter your code below
let anotherOperation !=0

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,941 Points

In this challenge you won't be modifying any of the values already given so you may want to start over. You have the following correct:

let result = value%divisor

The next step is to compare result to 0 and assign the result to isPerfectMultiple.