Challenge: My Profile Card
Completed
Read a person's name and age, store them in variables and print a small profile card.
Input
Line 1: a name. Line 2: an age (a whole number).
Output
Three lines:
Name: <name> Age: <age> Next year: <age + 1>
Example
Input
Asha 21
Output
Name: Asha Age: 21 Next year: 22
Editor
Python
Hints
input() reads one line as text.
Use int() to turn the age into a number before adding 1.
print("Name:", name) puts a space after the colon for you.
Solution explanation
We read the age as text and convert it with int() so that we can do age + 1.
Show solution
name = input()
age = int(input())
print("Name:", name)
print("Age:", age)
print("Next year:", age + 1)