Try improving the algorithm to calculate the difference so it is written in fewer lines of code.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/28797163-your-first-ios-swiftui-app-an-app-from-scratch/lessons/26