What is a procedure? - Procedures and functions - KS3 Computer Science Revision - BBC Bitesize (2024)

What is a procedure?

Just like , are designed to solve a problem. In order to solve the problem, the program needs to perform several tasks. is written to perform each of these tasks.

A real-life example of a procedure is brushing your teeth. There are several steps involved in this process – getting your toothbrush, squeezing the toothpaste onto the brush, brushing all your teeth, rinsing your mouth out and putting everything back. Each of these steps isn’t usually described, they just form part of the whole ‘brushing teeth’ procedure. The next time you need to brush your teeth, you remember the ‘brushing teeth’ procedure and know exactly what to do.

Why use procedures?

Program code is easier to read and understand when it is broken up into smaller sections. By breaking a program up into these sections, or procedures, code can be made shorter and simpler.

When writing programs it is very easy to end up with long-winded, repetitive code which is hard to understand and . This is because the same task often needs to be carried out in different places in the program. Procedures can be used throughout a program, making them simpler and quicker to code.

Using procedures has an added benefit. If something needs to be changed in a procedure, it only needs to be changed once, within the procedure code. This change will then appear wherever the procedure is used in the program. If procedures weren’t used, the code would have to be amended at every point that it appears in the program.

What is a procedure? - Procedures and functions - KS3 Computer Science Revision - BBC Bitesize (2024)
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 5650

Rating: 4.7 / 5 (47 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.