Thursday, July 26, 2018

Python TypeError must be str not int

Python TypeError must be str not int


While working on Modules using python using an IDE PyCharm i confronted an issue while printing int value using Print function of python.I’ve created a python module which i require to import prior to use.

Now question strikes in mind what actually Module is in Python.


I’ve craeted a fle named as Functions and having the below given code:



def calculate_square_area(length):
return length*length

The structure looks like of a sample application as shown below:

image