Question: Debugging The following code is intended to help a bouncer manage PyNightclub. Under 1 8 ' s are not allowed entry. 1 8 - 2

Debugging
The following code is intended to help a bouncer manage PyNightclub.
Under 18's are not allowed entry. 18-29 year olds may only enter the 'limited' section, but patrons aged 30+ get full access.
Copy the code into your programs.py file and test it.
In the comments below the code, list all the values that you should and did test with.
Remember that we have taught systematic ways to test code, so there should be no guesswork here.
Once you have run your tests, see if you can fix any errors in the best way possible.
Change the provided code and submit your improved code.
Test again with the good test values that you determined above.
# 6. Debugging
age = int(input("Age: "))
if age <18:
print("Entry refused")
elif age <30:
print("Limited entry allowed")
elif age >30:
print("Full entry allowed")
# Test values:
# (Input and expected outcomes)
# ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!