You will write two Python functions that return values, and a procedure that changes a global counter. These are the same ideas as PROCEDURE, FUNCTION and a global variable in pseudocode.
Your tasks.
area(length, width) returns the area of a rectangle.perimeter(length, width) returns the distance all the way round it.add_room(length, width) adds the area to the global floor_total. It returns nothing.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…