
H SDD - Parameter passing (revision)
Presentation
•
Computers
•
10th Grade
•
Practice Problem
•
Easy
G Alexander-Doyle
Used 7+ times
FREE Resource
8 Slides • 5 Questions
1
Parameter passing
Higher Computing Science - Software Design & Development
2
I can identify formal parameters and their associated actual parameters in code
Achievements
We are learning how data can be passed in and out of sub-programs using parameter passing.
aims
3
Parameter passing
A parameter is a value that is being passed into and/or out of a subprogram. When this subprogram is called the program must provided the required parameters, this is called parameter passing.
4
Actual Parameters
An actual parameter is the value that is being passed into the subprogram that will be used in within the scope of that subprogram. These parameters are used in call statements and can be the raw data or assigned to a variable. The call statements will always include the name of the sub-program with the parameters in brackets like so :-
Validate_percentage (0, 100, number)
SET Score TO Calculate_percentage (exam_score, coursework_score)
5
Actual Parameters - Exam question
The code below was created to display the dogID for those customers that are to be offered a discount.
Identify the line of code that would contain the actual parameters.
6
Formal Parameters
A formal parameter is the name given to the parameters identified in definition of the subprogram. Formal parameters are the parameters within brackets in the declaration of a function or procedure. The declaration will always include either PROCEDURE or FUNCTION, the name of the sub-program and the formal parameters in brackets like so :-
FUNCTION Calculate_score (INTEGER exam_score, INTEGER coursework_score)
7
FORMAL Parameters - Exam question
The code below was created to display the dogID for those customers that are to be offered a discount.
Identify the line of code that would contain the formal parameters.
8
Open Ended
Formal and actual parameters are used in this code.
Identify one formal parameter and its associated actual parameter. (2 marks)
9
Open Ended
Formal and actual parameters are used in this code above.
Identify one formal parameter and its associated actual parameter. (2 marks)
10
Fill in the Blanks
Type answer...
11
Fill in the Blanks
Type answer...
12
Open Ended
Describe how the parameters are used when executing line 23. Your answer should identify the formal and actual parameters. (3 marks)
13
Parameter passing
Higher Computing Science - Software Design & Development
Show answer
Auto Play
Slide 1 / 13
SLIDE
Similar Resources on Wayground
9 questions
Geometric Mean
Presentation
•
9th - 10th Grade
12 questions
Descriptive Text
Presentation
•
10th Grade
12 questions
Points, Lines, and Planes
Presentation
•
10th Grade
12 questions
Complex Numbers
Presentation
•
10th Grade
9 questions
Appositives and Appositives Phrases
Presentation
•
10th Grade
9 questions
Front End Development: Introduction to HTML
Presentation
•
10th Grade
9 questions
οι 4 εποχές
Presentation
•
KG
10 questions
Triangle Congruence
Presentation
•
10th - 11th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade