LearnPy Hub
← Modules & the Standard Library problems
Hard

JSON

Read a name and an age. Build a dictionary, turn it into a JSON string with json.dumps (sort_keys=True), print it, then load it back and print the age plus one.

Input

Two lines.

Output

Two lines.

Sample 1

Input
Mim
20
Output
{"age": 20, "name": "Mim"}
21

Sample 2

Input
Rafi
0
Output
{"age": 0, "name": "Rafi"}
1
solution.py
Output appears here
JSON · Python practice problem · LearnPy Hub