-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
  • 339,461
  • 188
  • 752
  • 538
Tonmoy
  • 101
  • 1
  • 4

1 Answers1

1

You need to cast:

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

input returns a string in python 3.

Padraic Cunningham
  • 168,988
  • 22
  • 228
  • 312