Skip to content

๐Ÿง‘๐Ÿพโ€๐Ÿ’ป Read the error message

Starter Analyse ๐Ÿ’ป Computational Thinking ๐Ÿค– AI Thinking and AI Literacy โฑ about 10 minutes 10 points

The challenge

A learner's program crashed with the error below. Explain what the error means, what caused it, and how to fix the code.

Code:
age = input("How old are you? ")
print("Next year you will be " + age + 1)

Error:
TypeError: can only concatenate str (not "int") to str

Instructions

  1. 1Read the last line of the error first.
  2. 2Find which value has the wrong type.
  3. 3Give a fixed version of the line(s).

Rules

  • Explain in your own words.

Success criteria

Your submission is marked against these criteria only.

  • Explains the error type Checked automatically 2 pts
  • Finds the cause (input returns text) Checked automatically 3 pts
  • Gives a working fix Checked automatically 3 pts
  • Clear and correct explanation Needs AI review โ€” not configured yet, so not assessed 2 pts
words

Your submission is private. It is marked only against the success criteria โ€” not on whether an AI produced an answer.

What an AI replied to your prompt

For comparison only โ€” this reply does not affect your score. Does it give you what you asked for?