0

I'm very new to programing, anyways, i was instructed to crate a program to calculate the are of rectangle, using the input from the user ( width, lenght ) using functions

here is what i have, but i'm getting a error at the end

recWidth = input ('Please enter the  Width of the rectangle ')
recLength = input ('Please enter the Length of rectangle ')

#fuction
def recArea (recWidth, recLength):
    result = recWidth * recLength
    return result

print "The are of your Rectangle is", recArea
2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by pixelss
1

You forgot to pass in the arguments in the last line.

print "The are of your Rectangle is", recArea(recWidth, recLength)
0

You forgot to pass in the arguments in the last line.

print "The are of your Rectangle is", recArea(recWidth, recLength)

thank you sir

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.