Boolean Logic and Abstraction Test Review

0.0(0)
studied byStudied by 1 person
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Logical Operators

operators, often referred to as Boolean operators that compare two Boolean operators: and, or, not

2
New cards

Modular Code

code organized into independent, self-contained units or modules that can be easily reused, maintained, and integrated with other parts of a program. Improves readability simplifies debugging, and enhances scalability especially in large programming

3
New cards

Functions

reusable blocks of code that perform a specific task when called

4
New cards

Abstraction

a technique or process that manages complexity in a program or computer program. It hides detail or removes duplication, allowing the programmer to focus on high-level considerations and function rather than rules of a programming language

5
New cards

Procedural Abstraction

using functions or procedures to simplify complex tasks by focusing on what they do, not how they work internally

6
New cards

Scope of Variables

the part of a program where a variable can be accessed or modified

7
New cards

Global Variables

a variable with a broad scope

8
New cards

Local Variables

variables declared inside a function

9
New cards

Benefits of modular code:

Increases readability of code

Easier to maintain and make changes to code

Reuse functionality of code

10
New cards

Abstraction, defintions:

simplifying complex systems by focusing on essential details and hiding unnecessary ones

11
New cards

What do we create in Python to write code that uses abstraction?

Functions or procedures

12
New cards

Benefits of procedural abstraction:

Provides a name for a process and allows it to be used only knowing what it does and not how it does it

Makes code reuse easier and helps manage complexity

Interrupts the sequential execution of statements, causing the program to execute the statements within the procedures (function) before continuing (no need to duplicate code)

13
New cards

Syntax for defining functions:

Def function_name():

Body of function

14
New cards

Syntax for calling functions:

function_name() <- parenthesis will have variables inside if the function definition takes parameters - remember, these are the input value to the function

15
New cards

What does scope of variables mean

the area of a program where a variable is recognized and can be used

16
New cards

What does global scope mean

the variable can be accessed anywhere in the program

17
New cards

Can you identify a global variable in a Python program?

Yes, it would have the keyword global

18
New cards

What does local scope mean

the variable only exists within the function it’s defined in

19
New cards

Can you identify a local variable in a Python program?

Yes, it wouldn’t have the keyword global