Coffee Prep Checker
In Coffee Prep Checker, you''ll be writing a simple logic to help someone decide if they''re ready to make their morning coffee. It’s all about checking if you have the necessary ingredients before you start the brewing process.
The logic is simple: you need to check if you have both coffee beans and water. If either one is missing, you can’t make coffee. Your task is to take these two conditions as input and output a clear decision.
For example, if you have beans but no water, the answer should be "NOT READY". Only if you have both will the answer be "READY". It’s a great exercise in using basic logical "AND" conditions to solve an everyday problem.
Algorithm Flow

Solution Approach
Checking for a minimum requirement is a basic thing you will do a lot in coding. In this scenario, your coffee machine just needs a certain amount of beans to work properly.
To write this in pseudocode, you can follow these simple steps:
First, you need to set up a variable to store the weight. Since it is a whole number, an integer is perfect for this. Next, read the value from your scale using the input function. Finally, compare that weight with 15 using the >= operator.
If the number is 15 or higher, you just output READY so the brewing can start. If it is lower, you output NOT ENOUGH to let the user know they need more beans. This simple check makes sure you never end up with a watery cup of coffee.
Best Answers
program coffee_prep
dictionary
weight: integer
algorithm
input(weight)
if weight >= 15 then
output("READY")
else
output("NOT ENOUGH")
endif
endprogramComments (0)
Join the Discussion
Share your thoughts, ask questions, or help others with this Challenge.
