Work out the area and perimeter of a rectangle.
MathsBeginner
Built from 3 kinds of block, between Start and End. Each one has a guide.
B4Coder writes the same program as real code. Change the flowchart in the editor and the code changes with it.
width = float(input("How wide is the rectangle (in cm)? "))height = float(input("How tall is the rectangle (in cm)? "))area = width * heightperimeter = 2 * (width + height)print("Area: " + str(area) + " square cm")print("Perimeter: " + str(perimeter) + " cm")How each block becomes code: Python · Java · C++ · C# · JavaScript