Objective
Create a Python program that reads a decimal number and shows it converted to other types.
Instructions
- Read a decimal number with
float(input()). - On the first line show its integer value (
int, which discards the decimals). - On the second line show the number as text followed by a space and the
€symbol. - On the third line show its logical value (
bool):Falseif it is 0 andTrueotherwise.
7.9
7
7.9 €
True
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise