+ 1
Why i am not getting an integer value?
a=input("enter a number. ") int(a) a=a*3 print(a)
2 Respostas
+ 3
Just replace
int(a)
With this
a = int(a)
Or alternatively you can directly cast the input to int as follows:
a = int(input("Enter a number: "))
P.S. You should add 'Python' in Relevant Tags.
+ 1
Thanks