

2.2 Subprograms
Presentation
•
Computers
•
10th Grade
•
Easy
Leah Tomlinson
Used 1+ times
FREE Resource
11 Slides • 5 Questions
1
2.2 Subprograms

2
3
4
5
Open Ended
Write a procedure where the user enters a number, it then squares it and outputs the answer
6
7
8
Open Ended
Write a function that adds together two numbers that are passed to the function as parameters
9
10
11
12
Multiple Choice
What would the following display?
PROCEDURE runningtotal(num as INT)
total = total + num
print("The total is " + str(total))
ENDPROCEDURE
#main program
runningtotal(6)
runningtotal(4)
"The total is 6
The total is 4
"The total is 6
The total is 10"
13
Multiple Choice
What needs to happen to the 'total' variable in the previous procedure in order for the program to work?
it needs to be declared locally
it needs to be declared globally
14
15
16
Open Ended
Give one reason why you would use a subprogram?
2.2 Subprograms

Show answer
Auto Play
Slide 1 / 16
SLIDE
Similar Resources on Wayground
11 questions
Federalist Vs. Anti-Federalist
Presentation
•
10th Grade
11 questions
GLOBALIZATION
Presentation
•
10th Grade
12 questions
Data Level Protection and Device Hardening Techniques
Presentation
•
10th Grade
12 questions
Overview of an Entrepreneurship
Presentation
•
10th Grade
10 questions
KABEL LAN
Presentation
•
10th Grade
11 questions
Inverse Functions
Presentation
•
10th Grade
13 questions
An Opinion Essay
Presentation
•
10th Grade
13 questions
Mechanical advantage
Presentation
•
10th Grade
Popular Resources on Wayground
15 questions
Grade 3 Simulation Assessment 1
Quiz
•
3rd Grade
22 questions
HCS Grade 4 Simulation Assessment_1 2526sy
Quiz
•
4th Grade
16 questions
Grade 3 Simulation Assessment 2
Quiz
•
3rd Grade
19 questions
HCS Grade 5 Simulation Assessment_1 2526sy
Quiz
•
5th Grade
17 questions
HCS Grade 4 Simulation Assessment_2 2526sy
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
24 questions
HCS Grade 5 Simulation Assessment_2 2526sy
Quiz
•
5th Grade
20 questions
Math Review
Quiz
•
3rd Grade