divider

Objective

Ask the user to enter the number of apples, bananas, and oranges they bought. Display a simple grocery summary.

Skills to Practice

  • icon Prompting a user for input
  • icon Performing arithmetic
  • icon Formatting text output
divider

Tasks

  • icon Create a new project named Sprint-1-7
  • icon Complete the following tasks:
    • icon Prompt the user to enter quantities for three fruits: apples, oranges, and bananas.
    • icon Display the grocery list and total quantity.
divider

Sample Output

Sample Output
How many apples are you buying? 4 [Enter]
How many bananas are you buying? 6 [Enter]
How many oranges are you buying? 3 [Enter]
Grocery List:
Apples: 4
Bananas: 6
Oranges: 3
Total fruit: 13

Begin Sprint