Why does my program only show the line of code U=float(input( "Enter the value of the letter 'U' : " )) in the terminal?
B=0
A=0
U=0
while(U == 0):
U=float(input( "Enter the value of the letter 'U' :" ))
ent=[200,101,255,11]
for i in ent:
A = A + (i * ( 1 -(1/10**2) ) / 255) -1/(10**2)
B = B + i
print(B)
The output of the program in the terminal is this:
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 0
Enter the value of the letter 'U' : 9
4536
Process finished with exit code 0
0as an input? SoUis always0, and thewhileloop continues - what happens if you enter something other than0? (by the way, your question appears to be a Python 3 question, not a Python 2 one, please remove the tag or update your code if it is a Python 2 question)Uin that loop, what's the point of entering it?