Comments

Report a typo

Select the numbers of the code blocks in which the comments are placed correctly.

1.

/* 
Calculates the distance traveled by car. 
According to the physical law, the distance is equal
to the product of time and the average speed of the object. */
def distance(time: Double, speed: Double): Double = time * speed

2.

/*
 * Calculates the distance traveled by car.
 * 
 * According to the physical law, the distance is equal
 * to the product of time and the average speed of the object.
 */
def distance(time: Double, speed: Double): Double = time * speed

3.

object Main extends App {
  val a = 12
  val b = 31

  // The area of a rectangle is equal to the product of its sides
  val area = a * b
}

4.

object Main extends App {
  val a = 12
  val b = 31

//The area of a rectangle is equal to the product of its sides
  val area = a * b
}
Select one or more options from the list
___

Create a free account to access the full topic