+ 1

Help me with code

Hello, here is the task: " We need to calculate the area of ​​the rectangle. Execute and call a function to print the area of ​​a rectangle using 2 arguments - length and width. If the sides are equal, the function should also show "Square" in the second output. " Here is my code: " length = int(input()) width = int(input()) def area(length, width ): if (length != width) or (length == width ): print (length * width ) elif (length == width ): print ("Square") area (length , width ) " help please, I have 3 tests out of 4, this code does not display "Square", please tell me where is the error

29th Aug 2021, 7:21 AM
Dmitriy Fursenko
Dmitriy Fursenko - avatar
1 Answer