Losing teams

Report a typo

Following the ⚽️🏆 2021-2022 UEFA Champions League standings 🏆⚽️, the Group H has been practically defined, and the two teams that will pass to the knockout stage are Chelsea and Juventus.

Note that the teams Chelsea and Juventus have qualified for the knockout stage because each one of them scored the maximum amount of possible points: 12.

Below, you will see the predefined groupH map that contains the team names as keys and the number of scored points as values.

Your task is to implement the required code to delete the losing teams, Zenit and Malmo from the groupH map and also implement the for...range loop to print the names of the two other teams that will pass to the knockout stage?

Write a program in Go
package main

import "fmt"

func main() {
groupH := map[string]int{
"Chelsea": 12,
"Juventus": 12,
"Zenit": 5,
"Malmo": 1,
}

// delete the losing teams from the 'groupH' map here
delete(?, ?)
delete(?, ?)

// do not change the text in the Println statement below!
fmt.Println("The two teams that will pass to the knockout stage are:")

// implement the for...range loop here to print the name of the qualified teams
for ? := range ? {
fmt.Println(?)
}
}
___

Create a free account to access the full topic