+ 3

Plz correct me

L=int(input("Enter length: ") W=int(input("Enter width: ") def rectangle_area(L,W) area= L*W return(rectangle_area)

1st May 2022, 10:30 AM
Kushal Sharma
Kushal Sharma - avatar
8 Answers
+ 12
You are missing closing brackets, a colon after the def line and the return variable is wrong I made this of it: L=int(input("Enter length: ")) W=int(input("Enter width: ")) def rectangle_area(L,W): area= L*W return(area) print(rectangle_area(L, W))
1st May 2022, 10:45 AM
Paul
Paul - avatar
+ 4
For int( no )👈closing brace missing., twice.. Call the function to use it... rectangle_area(L, W) return calculated area, not function name.. Print the returned value.. Try these corrections... Hope it helps..
1st May 2022, 10:46 AM
Jayakrishna🇮🇳
Jayakrishna🇮🇳 - avatar
+ 1
Thank you very much . It worked
1st May 2022, 11:09 AM
Kushal Sharma
Kushal Sharma - avatar
+ 1
Return area Then give input of L,W Then call the function.
2nd May 2022, 10:14 AM
sumit kumar
sumit kumar - avatar
+ 1
Plz correct me L=int(input("Enter length: ")) W=int(input("Enter width: ")) def rectangle_area(L,W) area= L*W return area print(rectangle_area(L, W))
3rd May 2022, 10:29 AM
Kusumanchi Yagna
Kusumanchi Yagna - avatar
0
Hello
2nd May 2022, 11:42 PM
Ярослав Хилькевич
Ярослав Хилькевич - avatar
0
My name is Yaroslav
2nd May 2022, 11:43 PM
Ярослав Хилькевич
Ярослав Хилькевич - avatar
0
From Russia
2nd May 2022, 11:43 PM
Ярослав Хилькевич
Ярослав Хилькевич - avatar