Predict crate-count examples

A laboratory specifies crates_needed(bottles) to return the minimum number of crates required to hold all its bottles. Each crate holds at most eight bottles, the input is a nonnegative integer, and zero bottles require zero crates. Before implementing the function, complete its expected outputs below using exact integer numbers of crates.

BottlesExpected crates
0
8
9
24

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More The Design Recipe Questions: