How to set data type in Google Colab Input?

I tried to sum this equation on Google Colab

a=1
b=input("B:")
c=a+b
print(c)

I was googling, the offered solution is c=a+int(b) but an error happened TypeError: 'str' object is not callable

Please help me to solve on how to sum c in Google Colab. Thanks a lot

>Solution :

I found no problem with the c=a+int(b) answer. Consider restarting your runtime.

enter image description here

Leave a Reply