We introduced a new game: the user enters a character, its Int representation and a Boolean marking if this character is upper case or not. The program checks if the input is correct. Finish the program!
Tuples
Character game
Report a typo
Sample Input 1:
a
97
falseSample Output 1:
trueWrite a program in Scala 3
object CharacterGame extends App {
val triple = (
scala.io.StdIn.readChar(),
scala.io.StdIn.readInt(),
scala.io.StdIn.readBoolean()
)
val expected = (
???,
???.toInt,
???.isUpper
)
println(triple == expected)
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.