diff --git a/Programming Basics/if Expressions/Exercise 2/src/Task.kt b/Programming Basics/if Expressions/Exercise 2/src/Task.kt index 0bf6395c..4f694cc7 100644 --- a/Programming Basics/if Expressions/Exercise 2/src/Task.kt +++ b/Programming Basics/if Expressions/Exercise 2/src/Task.kt @@ -2,7 +2,7 @@ package ifExpressionsExercise2 fun abs(number: Int): Int = - if (number > 0) number else -number + if (number >= 0) number else -number fun main() { println(abs(-19)) // 19 diff --git a/Programming Basics/if Expressions/Exercise 2/task-info.yaml b/Programming Basics/if Expressions/Exercise 2/task-info.yaml index 6f1db126..49697f47 100644 --- a/Programming Basics/if Expressions/Exercise 2/task-info.yaml +++ b/Programming Basics/if Expressions/Exercise 2/task-info.yaml @@ -4,7 +4,7 @@ files: visible: true placeholders: - offset: 88 - length: 35 + length: 36 placeholder_text: TODO() - name: test/Tests.kt visible: false