Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 3-conditional-expressions/Quiz.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fun main() {
val quizAnswer1 = 15
var quizAnswer2 = 3
val quizAnswer2 = 3
val quizAnswer3 = "isosceles"
val quizAnswer4 = 47

Expand Down Expand Up @@ -30,7 +30,7 @@ fun main() {
// Question 2
if (studentAnswer2 == quizAnswer2) {
points += 25
} else if (studentAnswer2 == quizAnswer2++ || studentAnswer2 == quizAnswer2--) {
} else if (studentAnswer2 == quizAnswer2+1 || studentAnswer2 == quizAnswer2-1) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpicking: I think you should add the space to make it clean
studentAnswer2 == quizAnswer2 + 1 || studentAnswer2 == quizAnswer2 - 1

points += 20
println("The answer $studentAnswer2 is within 1 point of $quizAnswer2")
} else {
Expand Down