Planets game

Report a typo

Scally is newbie programmer. She tries to entertain herself with some astronomy. She started writing a program that prints true if the three input lines are real planets of the Solar system and false otherwise. Finish her program.

Sample Input 1:

Mercury
Venus
Earth

Sample Output 1:

true
Write a program in Scala 3
object PlanetsGame extends App {
val set = Set("Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune")
val first = scala.io.StdIn.readLine()
val second = scala.io.StdIn.readLine()
val third = scala.io.StdIn.readLine()
println(set(???) && ???)
}
___

Create a free account to access the full topic