The pet hotel keeps rooms: each pet's room number. Write IsStaying(rooms, pet) to return true if the pet is staying there and false if not. Room 0 is a real room too.
IsStaying(map[string]int{"Mochi": 3, "Bean": 5}, "Bean")→TrueIsStaying(map[string]int{"Mochi": 3}, "Rex")→Falsefunc IsStaying(rooms map[string]int, pet string) boolpackage main
func IsStaying(rooms map[string]int, pet string) bool {
// your code here: look up pet in rooms; return true if it's there
return false
}
Run tries the examples. When they look right, Submit.