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

icon picker
The Task

Activity: Debug 6.4 In the Loop 🐞

Start Here

A bug report has been has been submitted on this program.
The purpose of this program is to output personalised guest passes for a coding club.
The program should ask the user to enter the number of passes needed and then ask for the names of the guests. The pass should have the name of the club and the name of the guest, you can see examples below.
But the program is not working properly. Some operations are repeated others are not. Can you help fix it?
Run and explore the program to identify errors. Try asking for 3 guests. The program will let you type a name in.
Refer to the code clips 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.
Good luck! 🍀

Sample output

Enter number of guest passes needed: 2

Enter next guest name: Ada Lovelace

==============================
Coding Club Pass

Guest: Ada Lovelace
==============================


Enter next guest name: Grace Hopper

==============================
Coding Club Pass

Guest: Grace Hopper
==============================
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.