+ 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
18 Réponses
+ 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)
+ 3
length = int(input())
width = int(input())
def area(length, width):
print (length*width)
area(length,width)
+ 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)
+ 1
Thanks for help
+ 1
length = int(input())
width = int(input())
def area(length, width):
area(length, width)
area = length*width
print(area)
if length==width:
print("Square")
+ 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)
+ 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...!
+ 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)
+ 1
length = int(input())
width = int(input())
def area(length, width):
print(length*width)
if length == width:
print ("Square")
else:
area(length,width)
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
0
w = int(input())
h = int(input())
def area(w, h):
print (w * h )
area(w,h)
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);
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)
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
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
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
0
#include <iostream>
using namespace std;
int main() {
double length;
double height;
cin>>length;
cin>>height;
cout<<length*height;
}
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;
}
}