Complete the code to print "Adult" if age is 18 or more.
if age [1] 18 { fmt.Println("Adult") }
The condition age >= 18 checks if age is 18 or more, which means the person is an adult.
Complete the code to print "Even" if the number is divisible by 2.
if num [1] 2 == 0 { fmt.Println("Even") }
The modulus operator % gives the remainder. If num % 2 == 0, the number is even.
Fix the error in the condition to check if score is less than 50.
if score [1] 50 { fmt.Println("Fail") }
The condition score < 50 checks if the score is less than 50, meaning fail.
Fill both blanks to print "Teenager" if age is between 13 and 19 inclusive.
if age [1] 13 && age [2] 19 { fmt.Println("Teenager") }
The condition age >= 13 && age <= 19 checks if age is between 13 and 19 inclusive.
Fill all three blanks to create a map of words to their lengths for words longer than 3 characters.
lengths := make(map[string]int) for _, [3] := range words { if len([3]) > 3 { lengths[[1]] = [2] } }
This code creates a map where each word is a key and its length len(word) is the value, but only for words longer than 3 characters.