LearnPy Hub
← Data Types & Casting problems
Hard

Sort Values by Type

Read tokens. A token is a bool if it is True or False, an int if int() accepts it, a float if float() accepts it, otherwise a str. Print the count of each type as int:a float:b bool:c str:d, then the sum of the int and float values with 2 decimals.

Input

Tokens separated by spaces.

Output

Two lines.

Sample 1

Input
3 2.5 True hello -4
Output
int:2 float:1 bool:1 str:1
1.50

Sample 2

Input
abc
Output
int:0 float:0 bool:0 str:1
0.00
solution.py
Output appears here
Sort Values by Type · Python practice problem · LearnPy Hub