Practice Memory Diagram


Snippet

    def give_cookies(total_cookies: int, num_students: int) -> int:
        print("Extra cookies: " + str(total_cookies % num_students))
        return int((total_cookies - (total_cookies % num_students))/2)

    print("Each student gets " + str(give_cookies(total_cookies=11, num_students=2)) + "cookies")

Solution

Image Description Here

Video

(Video Coming Soon)

Image Description

(Coming Soon)

Contributor(s): Created by Viktorya Hunanyan, Reviewed by Alyssa Lytle