The bakery puts a warning on anything with nuts. The ingredients are in recipe (all lower case). Write HasNuts(recipe): return true if it contains "nut" (as in walnut or peanut), false if not.
HasNuts("flour, walnuts, sugar")→TrueHasNuts("rice, egg")→Falsefunc HasNuts(recipe string) boolpackage main
import "strings"
func HasNuts(recipe string) bool {
// your code here: recipe contains "nut"? return true
return false
}
Run tries the examples. When they look right, Submit.