Right now, I am zooming into a section of my code as below :
qty = int(input('enter current quantity :'))
if qty != int:
print('input is not integer')
in the above chunk, i passed '5' yet it returns 'input is not integer'...
So i tried running the below code:
type(qty)
After running this, the output is 'str'
- does anyone know what can I change so that the inputs properly gets converted?
i tried....
#notice how i removed the space between '=' and 'int'
qty =int(input('enter current quantity :'))
if qty != int:
print('input is not integer')
this time, the same message appears... HOWEVER,
type(qty)
returns that it has successfully converted to 'int'