0

float("210" * int(input("Enter a number:" ))) Doesn't work when compiled?

Hello, as I've mentioned in the title, I can't get the output 210210.0 when I run this line in the compiler environment. The output I get is: Enter a number. Am I doing something wrong? How is it possible, when I have simply copied and pasted the code found in the question? Thank you in advance! Beppe

14th Apr 2020, 4:15 PM
Giuseppe Sinopoli
Giuseppe Sinopoli - avatar
1 Resposta
+ 5
You should write inside print. print(float("210" * int(input("Enter Number")))) If you will not write inside print you will get only that output.
14th Apr 2020, 4:23 PM
A͢J
A͢J - avatar