+ 1
How to put a string and a float as an answer
How can you get as output -"Distance =" + (distance)- For example distance = int(input()) print("the distance =" + distance) And that you get as output "the distance = 5" next to each other?
6 Respostas
+ 5
Pot Lood ,
not to forget that we do this task without any conversion, just use comma to separate the arguments of print() function. we also need no additional spaces...
...
print("the distance =", distance)
+ 4
+ str(distance)
+ 4
Korkunç el Gato ,
using print() with concatenation (+) of arguments: we have to put additional spaces as a separator between the values
using print with comma between arguments: space is inserted automatically
+ 2
Dang thank you
+ 1
Lothar If you had to concatenate you would have used spaces though, right? Just trying to make sure.