
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
Information Processing (IP)
Presentation
•
10th Grade
9 questions
Drivers
Presentation
•
10th Grade
9 questions
ORMATIKA
Presentation
•
10th Grade
10 questions
Point of View
Presentation
•
9th - 10th Grade
10 questions
Rational Exponents & Radicals
Presentation
•
10th Grade
8 questions
Digitális platformok online workshop
Presentation
•
KG
10 questions
Analyzing Influences
Presentation
•
10th Grade
9 questions
Limiting Reactant and Percent Yield
Presentation
•
10th Grade
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Computers
20 questions
Early Computing
Quiz
•
7th - 12th Grade
20 questions
Module 1 Topic 1 Vocabulary
Quiz
•
9th - 12th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade
39 questions
Safety Review
Quiz
•
9th - 12th Grade
20 questions
Digital Citizenship
Quiz
•
8th - 12th Grade
22 questions
Electronic Computing
Quiz
•
8th - 12th Grade