L1/10

Turning Text Into a Number

Real programs often receive input as text.

python
count_text = "7"
count = int(count_text)
print(count + 1)

Here is what the example does:

  • count_text stores the text "7".
  • count stores the returned value from int(count_text).
  • print(count + 1) displays the result of count + 1.

The assignment changes the specific values, but the basic pattern is the same.

Assignment

Complete the starter code so the program does the following:

  • Print int(age_text) + 1.

Your finished program should print exactly this output:

text
13

Be very careful with capitalization, spaces, and line breaks. The output must match exactly.