about | help | code help+videos | done | prefs |
Write a method called "sleepingCats" that returns true if the sleeping cats will stay asleep when you enter the room, or returns false if they will wake up when you enter the room. The cats will only stay asleep if there are 5 or fewer cats in the room, unless they just ate dinner in which case they will only stay asleep if there are 8 or fewer cats in the room. The parameter justAte is true if the cats just ate dinner, but is false otherwise. sleepingCats(3, true) → true sleepingCats(4, false) → true sleepingCats(5, false) → true ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 110
Copyright Nick Parlante 2017 - privacy