- 1

Can you concatenate with inputs respectively given 'float'?

21st Jul 2020, 1:30 AM
Cyn1
Cyn1 - avatar
6 ответов
0
That's exactly what I needed to know re string rules. Thankyou
21st Jul 2020, 6:57 AM
Cyn1
Cyn1 - avatar
0
No apparently you cannot. Unnecessary to do it such a way. Thanks anyway.
21st Jul 2020, 1:46 AM
Cyn1
Cyn1 - avatar
0
You're within the Python course... I think it is possible.
21st Jul 2020, 1:49 AM
Sandra Meyer
Sandra Meyer - avatar
0
print(input() + str(float(input()))) First input is a string... Second input, on a new line in SoloLearn input box, is a float, for example 5.7 It must converted first to "float" (because input() returns a string) than to "string", so it can be concatenated to the first string.
21st Jul 2020, 5:36 AM
Bilbo Baggins
Bilbo Baggins - avatar