0
baffling Python error msg
when I tried to run the following code: print(float(input("enter a number: ")) + float(input("enter another number: "))) I keep getting the following error msg. Can anyone please clarify? Enter a number: Traceback (most recent call last): File "..\Playground\", line 1, in <module> \ufeffprint(float(input("Enter a number: ")) + float(input("Enter another number: "))) ValueError: could not convert string to float:
1 Respuesta
+ 1
works fine for me, whats your input maybe thats the problem.
python use dot ( . ) as seperator not comma ( , )