Free practice · ordering · medium

Practice

Sequence shipping-rule pseudocode

Order the pseudocode for a standard $8 shipping charge that becomes $0 when subtotal is at least $75.

Shipping-rule constraints

Four facts must appear once in a complete algorithm

Policy exception
At least $75 waives the charge
Required result
One final shipping charge
Ordinary policy
Standard shipping costs $8
Available input
One numeric order subtotal

Use data and state dependencies to decide the execution order. The card identifies requirements but does not arrange the pseudocode for you.

Arrange in the correct order
  1. 1. Report the final shipping charge
  2. 2. If subtotal is at least $75, set shipping to $0
  3. 3. Set shipping to $8
  4. 4. Read the order subtotal