Finding and Fixing Errors - Code Quiz
1. Which line has a missing closing bracket?
01 print('Welcome')
02 print('Hello')
03 print('Goodbye'
Line 02
Line 03
No line is missing one
Line 01
2. The programmer wants to print the low stock message only when there are fewer than 10 apples. Which line contains the logic error?
01 apples = 50
02 if apples > 10:
03 print('Low stock')
04 else:
05 print('Plenty of stock')
Line 02
Line 01
Line 03
Line 05
Log in or sign-up to access the quiz
Don't have a login?
You can still revise this topic