-2

I am new in the world of programming. I have just started python 3.4.3. here i tried to write :

>>> A = input ("number :")
number :10
>>> A + 1

Traceback (most recent call last): File "", line 1, in A + 1 TypeError: Can't convert 'int' object to str implicitly.

Waiting for your help. TIA ... :)

EdChum
  • 376,765
  • 198
  • 813
  • 562
Tonmoy
  • 111
  • 1
  • 1
  • 4

1 Answers1

1

You need to cast:

A = int(input("number :"))

input returns a string in python 3.

Padraic Cunningham
  • 176,452
  • 29
  • 245
  • 321