Feb-21-2024, 04:56 PM
Python version: 3.12
Windows 10, x64
This the problematic raw:
---------------------------------------------------------------
a = float(input("Vnesi ja osnovata a = "))
---------------------------------------------------------------
When I press "enter" I get this message:
Traceback (most recent call last):
File "C:\Users\5ar5r\Desktop\keops.py", line 1,
in a = float(input("Vnesi ja osnovata (a) = "))
ValueError: could not convert string to float: ''
I try to get a number value from the input and when I press "enter" I expect that Python will convert empty string into number 0, but it does not. Please, can you explain to me where the problem is?
Windows 10, x64
This the problematic raw:
---------------------------------------------------------------
a = float(input("Vnesi ja osnovata a = "))
---------------------------------------------------------------
When I press "enter" I get this message:
Traceback (most recent call last):
File "C:\Users\5ar5r\Desktop\keops.py", line 1,
in a = float(input("Vnesi ja osnovata (a) = "))
ValueError: could not convert string to float: ''
I try to get a number value from the input and when I press "enter" I expect that Python will convert empty string into number 0, but it does not. Please, can you explain to me where the problem is?