A different message for each failure

Write code · Medium · §13.3 What to catch

Follower counts are stored as strings. For each name in names, convert the follower count to an integer and print it like mina 1200, and on the last line, print the total of the converted numbers like Total 1540. If a name is not in followers, print a line like dami unknown name, and if a count cannot be converted to an integer, print a line like jun not a number; leave both out of the total. Catch the two failures separately with two except clauses, and do not catch other errors.

Starter code

followers = {"mina": "1200", "jun": "private", "sora": " 340 "}
names = ["mina", "jun", "dami", "sora"]

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.