Unit 2 Task 50: Delivery van route checker

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Unit 2 Task 50 - Delivery van route checker

← Unit 2 tasks · Solution


A van has capacity C kg (float). Packages arrive one at a time; each weight is a positive float. Add weights to a load.

Print final load and whether the van is full (load equals C within a tiny tolerance is optional) or under capacity.

Skills: while, if predicting overload before adding.