[❗️SWIFT❗️] Rounding issue with (?) Kaleidoscope code coach
From Code Coach, Kaleidoscopes, SWIFT!!!! let ScopeInput:String! = readLine() var ScopesOrdered:Double! = Double(ScopeInput) var FinalPrice: Double = 0 if ScopesOrdered > 1 { //Apply discount (10 percent) FinalPrice = (ScopesOrdered * 5) * 0.90 //Apply Taxes FinalPrice += (FinalPrice * 7/100) } else { FinalPrice = (ScopesOrdered * 5) //Calculate base price for one scope - without a discount FinalPrice += (FinalPrice * 7/100) //Apply Discount } FinalPrice *= 100 FinalPrice.round() FinalPrice /= 100 print(FinalPrice) So after several tests and revisions, my code passes all but one - 4 tests and one of them is hidden. (The only test that failed) I am almost certain I’ve come to a conclusion that there’s a rounding issue in the output of test #4 ? (It is hidden and I’d just like to know how I would go about Strict rounding of whatever input is passed into Test#4)