To borrow from the library you need both: a library card (hasCard) and fewer than 5 books already out (books). Write CanBorrow(hasCard, books) to return true if you can borrow, false if not.
CanBorrow(true, 2)→TrueCanBorrow(false, 0)→Falsefunc CanBorrow(hasCard bool, books int) boolpackage main
func CanBorrow(hasCard bool, books int) bool {
// your code here: has a card and fewer than 5 books? return true
return false
}
Run tries the examples. When they look right, Submit.