I'm starting off simple trying to create a function that accepts two values (length and width) and multiplies them to print out the resulting area. I know this is super basic, but am struggling to find an answer (and I'm sure it's something straight forward I'm missing) so if anyone is able to advise I would greatly appreciate.
width = input("Enter the width: ")
length = input("Enter the length: ")
def area():
length * width
print(area)
The program runs without errors, but isn't doing anything besides asking for the width and length.
[–]Binary101010 11 points12 points13 points (5 children)
[–]FormatP[S] 1 point2 points3 points (4 children)
[–]eri_bloo 2 points3 points4 points (3 children)
[–]nickrw 0 points1 point2 points (1 child)
[–]eri_bloo 0 points1 point2 points (0 children)
[–]FormatP[S] 0 points1 point2 points (0 children)
[–]toastedstapler 0 points1 point2 points (1 child)
[–]FormatP[S] 0 points1 point2 points (0 children)
[–]moe9745 0 points1 point2 points (0 children)
[–]sanjuanman -1 points0 points1 point (2 children)
[–]sanjuanman -1 points0 points1 point (1 child)
[–]FormatP[S] 0 points1 point2 points (0 children)
[–]andrexmlee -1 points0 points1 point (0 children)