Programming in Kotlin - Part 3: Kotlin Basics | Ray Wenderlich

Review some of the core concepts of Kotlin that were covered in Your First Kotlin Android App course.

This is a companion discussion topic for the original entry at
1 Like

The calculations in this video for temperature conversion are not correct. The correct answers are: 20 degrees C = 68 degrees F and 50 degrees C = 122 degrees F.

I think the error comes from integer truncation, the formula should be 9.0/5.0 * celsius + 32.0 so that everything is treated as a double. As you have written the formula, 9/5 = 1 (truncated integer) so you effectively just have celsius + 32 in your results.

You are correct. Thanks for catching that.

Any chance you can redo this video or announce the error elsewhere? I was scratching my head for a while before I saw the notes and discussion…

We will be putting a note on the video to make sure viewers know about this