๐ง๐พโ๐ป 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
- 1Read the last line of the error first.
- 2Find which value has the wrong type.
- 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
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?