int() function broken?
I have an input that I turn into an integer for some math stuff, but when I put in a decimal, it comes out with an error:
ValueError: Invalid literal for int() with base 10: '1.75'
You would have to use
float(). An integer is a whole number, so it cannot have a decimal point, and the
int() would not work. And by the way,
int() is not actually a function. It is a class, pre-defined by python.
Please upvote if this was helpful in any way!
now python seems to think that 500 isn't less than 10000.
put in 10000 in the first input, 500 in the third, and any numbers in the other two.
the final output should be more than 1, but it's not.
a = input('linear start num: ')
b = input('linear increase num: ')
c = input('exponential start num: ')
d = input('exponential increase num: ')
num = 1
while c < a:
num += 1
a = float(a) + float(b)
c = float(c) * float(d)