How to write a program that calculates the area of โ€‹โ€‹a rectangle in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to write a program that calculates the area of โ€‹โ€‹a rectangle in python

8th Mar 2020, 1:52 PM
khaled abdi
khaled abdi - avatar
2 Answers
+ 3
You have to think about what you need... To calculate the area of rectangle you need length and breadth (width) Just create 2 variables (float/int), multiply them and print the value.
8th Mar 2020, 2:20 PM
Utkarsh Sharma
Utkarsh Sharma - avatar
+ 1
The formula for the area of a rectangle is: area = length * width You should be able to figure out how to make it a Python code, I believe.
8th Mar 2020, 2:20 PM
ใ‹ใ‚“ใงใ‚“
ใ‹ใ‚“ใงใ‚“ - avatar