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

icon picker
Solution

Solution

solution
print('\n') # display blank line

# enter product
product = input('Enter product for this batch: ')

# enter scent
fragrance = input('Enter fragrance for this batch: ')

# enter scent
batchCode = int(input('Enter batch code number: '))

# enter scent
batchSize = int(input('Enter number of products in this batch: '))
print('\n\n') # display blank line (2)
# prints out a label for every product box
for i in range (batchSize) :
print('Scents of Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿')
print('Enjoy our hand-crafted ' + product)
print('Fill your home with the beautiful scent of ' + fragrance)
print('Quality Control: Batch#' + str(batchCode) + ' - Serial#' + str(i+1))
print('...........................................................\n')

original
print('\n') # display blank line

# enter product
product = input('Enter product for this batch: ')

# enter scent
fragrance = input('Enter fragrance for this batch: ')

# enter scent
batchCode = int(input('Enter batch code number: '))

# enter scent
batchSize = int(input('Enter number of products in this batch: '))
print('\n\n') # display blank line (2)
# prints out a label for every product box
for i in range batchSize :
print('Scents of Scotland 🏴󠁧󠁢󠁳󠁣󠁴󠁿')
print('Enjoy our hand-crafted ' + product)
print('Fill your home with the beautiful scent of ' + fragrance)
print('Quality Control: Batch#' + str(i) + ' - Serial#' + str(batchSize))
print('...........................................................\n')
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.