Gallery
Debug 6.1. Loop Control
Share
Explore
Debug 6.1. Loop Control

icon picker
The Task

Activity: Debug 6.1 loop-control ๐Ÿž ๐Ÿ•ฏ

Start Here

Scottish Scents is a small business which makes hand-crafted products with Scottish-themed frangrances.
Every day, they make a batch of candles or soap or diffusers. A batch is between 6 and 24 items. Each individual product is sold in its own box which has an information label.
A bug report has been has been submitted on this program which is for printing out box labels.
The program should ask the user to input the product name, the frangrance, a batch code-number and the number of products in the batch. But it isnโ€™t working.
We have checked the program and it looks like there is a problem in the line that sets up the for loop and also the variables inside the loop body also look mixed up. Can you help fix it?
Run and explore the program to identify errors.
Refer to the code clips and the sample output below to help you fix the errors.
Right click on your code and add a comment explaining what was wrong and how you fixed it.
โ 
Scents of Scotland: Natural Fragrances
Scottish Rose
Caledonian Pine
Hebridean Whisky
Highland Heather
โ 
Scents of Scotland: Artisan Products
Candles
Soap
Diffusers
โ 
Good luck! ๐Ÿ€

Sample output

Enter product for this batch: Candles
Enter fragrance for this batch: Highland Heather
Enter batch code number: 31126
Enter number of products in this batch: 6
Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#1
...........................................................

Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#2
...........................................................

Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#3
...........................................................

Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#4
...........................................................

Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#5
...........................................................

Scents of Scotland ๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ
Enjoy our hand-crafted Candles
Fill your home with the beautiful scent of Highland Heather
Quality Control: Batch#31126 - Serial#6
...........................................................
Share
 
Want to print your doc?
This is not the way.
Try clicking the โ‹ฏ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.