Computer Science Unit 5 - 7 Review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:38 AM on 3/24/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

What is the difference between definitions written as procedures and ones written as functions?

Functions

  • Purpose: To calculate or update a value.

  • Key Command: Must have a return statement.

  • How to Call: Called inside another statement (like print() or an assignment).

Procedures

  • Purpose: To perform repetitive actions.

  • Key Command: Does NOT have a return statement.

  • How to Call: Called as a standalone statement on its own line.

2
New cards

What are functions used in coding?

They are designed to calculate a value or update a variable.

3
New cards

What should be included in a function?

It must include a return statement to send data back to the part of the program that called it.

4
New cards

What are procedures in coding?

They are used to perform repetitive actions where they do not have a return statement. A procedure is usually called as a standalone statement on its own line.

5
New cards

What are parameters in coding?

They are used to pass information from the main program into a subprogram (such as a function or procedure).

6
New cards

Why should we use parameters?

It allows a subprogram to be used in many different contexts. Instead of relying on hard-coded values or specific global variable names, the subprogram performs its task using whatever data is passed into its parameters at that moment.

7
New cards

What are exceptions in coding?

It is a signal that an error or other unusual condition has occurred.

8
New cards

What are exceptions used for in coding?

To test code for runtime errors and prevent the program from crashing unexpectedly.

9
New cards

What are finally statements used for?

It is an optional clause that is not often used, but when included it always executes whether an error occurred or not.

10
New cards

What are else statements used for?

This optional clause runs only if no error or exception occurs in the try block.

11
New cards
12
New cards
13
New cards
14
New cards

Explore top notes

note
Richard III
Updated 1239d ago
0.0(0)
note
Group 16 elements
Updated 1346d ago
0.0(0)
note
Ethics in Health Care
Updated 1197d ago
0.0(0)
note
Political History
Updated 1198d ago
0.0(0)
note
Developmental Psych Chapter 19
Updated 1284d ago
0.0(0)
note
Untitled Flashcards Set
Updated 466d ago
0.0(0)
note
Verben Conjugations
Updated 415d ago
0.0(0)
note
Richard III
Updated 1239d ago
0.0(0)
note
Group 16 elements
Updated 1346d ago
0.0(0)
note
Ethics in Health Care
Updated 1197d ago
0.0(0)
note
Political History
Updated 1198d ago
0.0(0)
note
Developmental Psych Chapter 19
Updated 1284d ago
0.0(0)
note
Untitled Flashcards Set
Updated 466d ago
0.0(0)
note
Verben Conjugations
Updated 415d ago
0.0(0)

Explore top flashcards

flashcards
poznávačka rostliny
95
Updated 421d ago
0.0(0)
flashcards
ANTHC101 EXAM #1
97
Updated 386d ago
0.0(0)
flashcards
El bienestar
52
Updated 1168d ago
0.0(0)
flashcards
IST Summitive Ms Yunus 9th
25
Updated 189d ago
0.0(0)
flashcards
Autoteile Vokabeln
43
Updated 1037d ago
0.0(0)
flashcards
AP Lang Rhetorical Devices
80
Updated 482d ago
0.0(0)
flashcards
Unit 8: The New South
20
Updated 46d ago
0.0(0)
flashcards
poznávačka rostliny
95
Updated 421d ago
0.0(0)
flashcards
ANTHC101 EXAM #1
97
Updated 386d ago
0.0(0)
flashcards
El bienestar
52
Updated 1168d ago
0.0(0)
flashcards
IST Summitive Ms Yunus 9th
25
Updated 189d ago
0.0(0)
flashcards
Autoteile Vokabeln
43
Updated 1037d ago
0.0(0)
flashcards
AP Lang Rhetorical Devices
80
Updated 482d ago
0.0(0)
flashcards
Unit 8: The New South
20
Updated 46d ago
0.0(0)