100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Essay

Unit 16 : Procedural programming { P1 M1 D1 }

Rating
-
Sold
1
Pages
5
Grade
A+
Uploaded on
26-02-2021
Written in
2020/2021

P1 explain the key features of procedural programs M1 explain why modular elements are important for procedural programming D1 evaluate the suitability of procedural programs for graphical applications










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
February 26, 2021
Number of pages
5
Written in
2020/2021
Type
Essay
Professor(s)
Unknown
Grade
A+

Subjects

Content preview

P1 explain the key features of procedural programs

Key features:
Procedures
Procedures in a program are the steps that the program goes through to complete the task. These
procedures can vary since every program might do different things such as calculation then returning
the value, doing a calculation and so on. The program will do the things that are programmed by the
programmer.

Functions
Functions are similar to procedures but they return a value. Functions are specific sections which are
self-contained modules which accomplish a specific set of tasks. Functions in general take the data,
process it and return the result, functions can be used many times in code as it is made to save time
and make code shorter. Functions can also be called from the inside of other functions.

Pre-defined functions
Pre-defined are specific commands in every programming language. They are already created and
ready to use in the wild. Such per defined function is print (), which will printout for example string,
variable and integer writing inside the brackets.

Local variables
Local variable can only be used in the place where it is placed. For example, user create a function
and in this function a variable is created, the variable can only be used in the function and not outside
and that is called local variable.

Global variables
Global variables are variables that can be used throughout the program code which is good for
programs that wants to use the same variable over and over throughout the program.

Parameter passing
Parameter passing is variable values to be passed through the program and then to the procedure.

Modularity
Modularity is how the program has different tasks that are grouped to complete the main tasks. In
every group, it has their own task to complete. Modularity are modules which are split into groups to
complete certain tasks one after another so it will a continuous system.

Programming libraries
Programming libraries have a collection od made up sources of class, codes, values and subroutines
which can be used by the programmer at any time in the program.

, Control structures:
A control structure is a block of programming that analyses variables and choses a direction that is
based on given parameters. The term flow control details the direction the program takes.

Fixed Loop
Fixed loop is a loop that tells the programmer how many times the loop needs to run for.
Example:
count = 0
for x in range (1,1010;
if x%2 ==0;
count = count + x
print(count)

Pre-check Loop
Pre-check loop is a loop that checks the program for any errors before carrying out the procedure and
executing the program to see if it will work.
Example:
x=6
while x>0;
print (“the x is”, x)
print (“that will never appear”)

Post Check Loop
Post check loop is a loop that test runs the program to make sure that it works before running the
actual program.

Break Points
These are temporary makers that tell the programmer to stop the program at a certain statement
and line.

Conditional commands
IF, ELSE, Boolean Operators and other conditional statements are used to tell whether the condition
is true or false.
An Example of IF Else statement:
x=0
if 5 in (1,2,3,4);
x = x+1
else if 4==2;
x =x+2
else if 7>4;
9x = x+4
print(x)

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
jessykaur Staffordshire University
View profile
Follow You need to be logged in order to follow users or courses
Sold
31
Member since
4 year
Number of followers
23
Documents
36
Last sold
1 year ago

2.3

12 reviews

5
2
4
0
3
2
2
3
1
5

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions