id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

gaurav1780@gmail.com 01_variables_and_operators > eggs_left
prev  |  next  |  chance

Define a function that when passed two integers, the first representing the total number of eggs, and the second representing the size of tray (number of eggs that can fit in one tray), returns the number of eggs left behind after all possible trays have been filled (completely).


eggs_left(1000, 50) → 0
eggs_left(80, 20) → 0
eggs_left(80, 30) → 20

...Save, Compile, Run (ctrl-enter)

def eggs_left(n_eggs, tray_size):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 1 Post-solution available

Copyright Nick Parlante 2017 - privacy