My issue
My code
# Update the code below this line to solve the problem
Length = 45
width = 76
Area = length * width
print ("the Area of the given rectangle is", Area)
Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone
@treytreydtb67
Traceback (most recent call last):
File "/mnt/sol.py", line 5, in <module>
Area = length * width
NameError: name 'length' is not defined
this was the compilation error your code gave.
Check the variable ‘length’ you have used to compute area v/s the variable ‘Length’ you initialised.
You had used a capital L in initializing your variable “length”. Change it from “Length” to “length”.
length = 45
width = 76
Area = length * width
print ("the Area of the given rectangle is", Area)
use captical Length like Area = Length * width so it will help you
There is no special benefit that comes out of using capital letters in variable names. Instead, it creates a scope for more errors.