Feb-17-2018, 06:46 PM
def main(): print("Welcome to the rectangle calculator") print() # Calls// input_rectangle1() input_rectangle2() area_1 = calc_area1(lenght1, width1) area_2 = calc_area2(length2, width2) display(area_1,area_2) def input_rectangle1(): print("Values of rectangle number one") print() length1 = float(input("Enter length of rectangle: ")) width1 = float(input("Enter width of rectangle: ")) return length1, width1 def input_rectangle2(): print("Values of rectangle number two") print() length2 = float(input("Enter length of rectangle: ")) width2 = float(input("Enter width of rectangle: ")) return length2, width2 def calc_area1(length1, width1): area_1 = length1 * width1 return area_1 def calc_area2(length2, width2): area_2 = length2 * width2 return area_2 def display(area_1,area_2): if area_1 > area_2: print("The are of the rectangle number 1 is bigger") elif area_2 > area_1: print("The are of the rectangle number 2 is bigger") else: print("The areas are the same") main()Okay so basically that's for my homework, I already finished it as you guys can tell, but for some reason when I execute it it says this:
Error:input_rectangle1()
TypeError: input_rectangle1() missing 2 required positional arguments: 'length1' and 'width1'
so any feedback would be great, if you can explain me how to do it instead of giving me the answer I'd appreciate it, thanks and have a good day y'all!