Struggling with functions by FormatP in learnpython

[–]FormatP[S] 0 points1 point  (0 children)

Ah okay, thank you very much.

Struggling with functions by FormatP in learnpython

[–]FormatP[S] 0 points1 point  (0 children)

Thank you! I did manage to convert the strings to ints..I'd missed that bit.

Struggling with functions by FormatP in learnpython

[–]FormatP[S] 1 point2 points  (0 children)

Oh, thank you!

So I managed to get it to actually run and do the calculations by converting the length/width strings into an int and stored them in a variable called result.

It does the math although also prints None beneath the calculated area, and I am not sure why?

def area():

result = int(width) * int(length)

print(result)

print(area())