Question: PYTHON (eggs.py) Write a program that calculates the number of cartons needed to pack the eggs just collected. Each carton contains one dozen eggs. Validate
(eggs.py) Write a program that calculates the number of cartons needed to pack the eggs just collected. Each carton contains one dozen eggs. Validate input (number must be non-negative). Use the integer division and remainder operators. Don't forget to use a constant. Sample run #1 This program will determine the required number of 1-dozen egg cartons. How many eggs did you collect today? 144 We will pack your 144 eggs in 12 cartons. There will be 0 eggs left over. Sample run #2 This program will determine the required number of 1-dozen egg cartons. How many eggs did you collect today? -5 Your value cannot be negative. Sample run #3 This program will determine the required number of 1-dozen egg cartons. How many eggs did you collect today? 45 We will pack your 45 eggs in 3 cartons. There will be 9 eggs left over
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
