Open Ducky0808 opened 2 years ago
It may seem you are multiplying two integers but that is not the case. The arguments entered into the input function must be a string to prompt the user, ID = input("Enter a number: ") What is happening in your code is that you are printing "17362", then waiting for a key press "ENTER" and then multiplying that key press or empty string by a,b,c,d. This is the cause of the ValueError.
It is because you are giving a string in the input where which accepts only and only integer. Just change the input you are giving and that's it. You are good to go.
while True:
ID = int(input("Write a number: "))
a = 19
b = 43106
c = 54
d = 986510
print(ID * a + b * c + d)