Python casting error: Invalid literal for int() with base 10

You are doing the casting at the wrong place.

Remove the int() cast, bring it outside the input()

l1 = int(input('enter the length:'))
l2 = int(input('enter the breadth'))

That would fix it.

Browse More Popular Posts

Leave a Comment