Gallery
Solution Debug 6.4. In the Loop
Share
Explore
Solution Debug 6.4. In the Loop

icon picker
Solution

Solution

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

# ask user how many passes are needed
guests = int(input('Enter number of guest passes needed: '))

print('\n\n') # display blank line (2)
# get guest names and display a pass for each one
for i in range(guests) :

name = input('Enter next guest name: ')
print('\n') # display blank line (2)

print('==============================')
print(' Coding Club Pass');
print('\n')
print('Guest: ' + name)
print('==============================')

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



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

# ask user how many passes are needed
guests = int(input('Enter number of guest passes needed: '))

print('\n\n') # display blank line (2)
# get guest names and display a pass for each one
for i in range(0,guests, 1) :

name = input('Enter next guest name: ')
print('\n') # display blank line (2)




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


print('==============================')
print(' Coding Club Pass');
print('\n')
print('Guest: ' + name)
print('==============================')
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.