100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Unit 16: Procedural Programming { P1 M1 D1 } $9.67
Add to cart

Other

Unit 16: Procedural Programming { P1 M1 D1 }

 50 views  1 purchase
  • Course
  • Institution
  • Book

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

Preview 2 out of 5  pages

  • June 30, 2021
  • 5
  • 2020/2021
  • Other
  • Unknown
avatar-seller
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)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller jessykaur. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.67. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

53068 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.67  1x  sold
  • (0)
Add to cart
Added