CodeField

Find the bug

This program should read an age and print the age next year, but it stops with an error. Tap the line at fault, then choose a fix.

Input: 17.

Python stops with an error on line 2: TypeError: can only concatenate str (not "int") to str

It printed nothing.

It should print:

  1. 18

Tap the line at fault

Tips

  • Compare what the program printed with what it should print.
  • Follow the program with the test's input until it first goes wrong.