+ 1

Who can explain this question

We need to calculate the area of the rectangle. Complete and call the function to output the area of the rectangle, taking 2 arguments as length and width. If sides are equal, the function should also show "Square" as the second output. Sample Input 1 7 4 Sample Output 1 28 How can I assign output # 2 in the code to complete the task? https://code.sololearn.com/cY6UoI9ZuocK/?ref=app

6th Jan 2021, 7:57 PM
XLK
XLK - avatar
18 ответов
+ 11
length = int(input()) width = int(input()) def area(length, width): #your code goes here print (length * width ) if length == width: print ("Square") area(length,width)
6th Jan 2021, 8:28 PM
Martin Ed
Martin Ed - avatar
+ 3
length = int(input()) width = int(input()) def area(length, width): print (length*width) area(length,width)
31st Jan 2022, 3:51 PM
Akshay Kumar Mishra
+ 2
w = int(input()) h = int(input()) #call the function def area(h, w): #your code goes here print (h * w ) if h == w: print ("Square") area(h,w)
2nd Feb 2022, 7:02 PM
bouhajja belhassen
+ 1
Thanks for help
6th Jan 2021, 8:30 PM
XLK
XLK - avatar
+ 1
length = int(input()) width = int(input()) def area(length, width): area(length, width) area = length*width print(area) if length==width: print("Square")
30th Dec 2021, 7:00 PM
Shahad Al-Shama
+ 1
length = int(input()) width = int(input()) def area(length, width): #your code goes here print (length * width ) if length == width: print ("Square") area(length,width)
10th Feb 2022, 3:09 PM
Ayush
Ayush - avatar
+ 1
length = int(input()) width = int(input()) def area(length, width): #your code goes here print (length * width ) if length == width: print ("Square") area(length,width) done...!
6th Mar 2022, 2:51 PM
Nikhila
+ 1
length = int(input()) width = int(input()) def area(length, width): #your code goes here print (length * width ) if length == width: print ("Square") area(length,width)
31st Mar 2022, 9:54 PM
Abdelkhalek Nael Ahmad Allan
Abdelkhalek Nael Ahmad Allan - avatar
+ 1
length = int(input()) width = int(input()) def area(length, width): print(length*width) if length == width: print ("Square") else: area(length,width)
19th Jul 2022, 10:11 AM
Fatemeh
Fatemeh - avatar
0
#include <iostream> using namespace std; int main() { //sides of the room double length = 5.4; double width = 2.3; cin >> length; cin >> width; //output the area cout << length*width; return 0; } that's it buddies., hahhahaha !!!! just try its correct
10th May 2022, 12:46 PM
Giri Prasath K
0
w = int(input()) h = int(input()) def area(w, h): print (w * h ) area(w,h)
3rd Jun 2022, 4:18 PM
Evgen Shamanayev
Evgen Shamanayev - avatar
0
let width = parseInt(readLine(),10); let length = parseInt(readLine(),10); //Completa la función function area(width, length){ let result = width * length; return result; } //call the function let a = area(width, length); console.log(a);
30th Dec 2022, 8:16 PM
altair272
altair272 - avatar
0
length = int(input()) width = int(input()) def area(length, width): #your code goes here print (length * width ) if length == width: print ("Square") area(length,width)
3rd May 2023, 7:57 PM
Dharmendra Kumar
Dharmendra Kumar - avatar
0
Make a html code program is required to read or accept input for the length &width of the rectangular house the block, & the length & the width of the rectangular house The program then is required to compute & display the mowing time required to cut the grass around the house, at the rate of two square meters per minute
21st May 2023, 9:37 AM
Charlotte Gaming
0
chatgpt exercise 3 answers write a function that calculate the area of the square and rectangle only the program must select what shape must be calculated the program must also have plotte
3rd Feb 2024, 10:31 AM
Jonel Huiso
Jonel Huiso - avatar
0
chatgpt exercise 3 answers write a function that calculate the area of the square and rectangle only the program must select what shape must be calculated the program must also have plotte
3rd Feb 2024, 10:32 AM
Jonel Huiso
Jonel Huiso - avatar
0
#include <iostream> using namespace std; int main() { double length; double height; cin>>length; cin>>height; cout<<length*height; }
24th Feb 2024, 11:15 AM
Warisjan Tohti
Warisjan Tohti - avatar
0
using System; public class Program { static void Main(string[] args) { int width = Convert.ToInt32(Console.ReadLine()); int length = Convert.ToInt32(Console.ReadLine()); //output the result Console.WriteLine(Area(width, length)); } //fix the method static int Area(int width, int length) { return length*width; } }
29th Apr 2024, 11:02 AM
Vinayak Patil
Vinayak Patil - avatar