ib cs b2.1 b2.2

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

1/55

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.

56 Terms

1
New cards
2
New cards
3
New cards

Variable :: A named storage location in memory used to hold a piece of data.

4
New cards
5
New cards
6
New cards

Data Type :: Specifies the type of data a variable holds (e.g., Integer, Float, String, Boolean).

7
New cards
8
New cards
9
New cards
10
New cards

Integer (int) :: A data type for storing whole numbers (positive or negative). Example: age = 16

11
New cards
12
New cards
13
New cards

Float :: A data type for storing numbers with a decimal point. Example: price = 19.99

14
New cards
15
New cards
16
New cards

String (str) :: A data type for a sequence of characters, enclosed in quotes. Example: name = "Ada Lovelace"

17
New cards
18
New cards
19
New cards

Boolean (bool) :: A data type representing truth values, either True or False. Example: is_active = True

20
New cards
21
New cards
22
New cards

Global Variable :: Declared outside of any function; can be accessed from anywhere in the program. Example: player_score = 100 is usually global.

23
New cards
24
New cards
25
New cards

Local Variable :: Declared inside a function; can only be used within that specific function. Example: local_bonus = 25 inside a function.

26
New cards
27
New cards
28
New cards

Floor Division (//) :: An arithmetic operator that divides two numbers and discards the remainder, resulting in an integer. Example: 10 // 4 results in 2.

29
New cards
30
New cards
31
New cards

Modulus (%) :: An arithmetic operator that divides two numbers and gives the remainder. Example: 10 % 4 results in 2.

32
New cards
33
New cards
34
New cards

Slicing (String) :: Extracting a part of a string (a substring) using indices. The last index specified is non-inclusive. Example: "Python"[1:4] returns "yth".

35
New cards
36
New cards
37
New cards

Concatenate :: To join (link) two or more strings together end-to-end. Example: "IB" + "CS" results in "IBCS".

38
New cards
39
New cards
40
New cards

Immutable :: A property of strings in Python meaning their value cannot be changed after creation; operations like replace() create and return a new string.

41
New cards
42
New cards
43
New cards

Computational Thinking :: The thought process for formulating a problem and expressing its solution in a way a computer (human or machine) can execute.

44
New cards
45
New cards
46
New cards

Decomposition :: Breaking down a large, complex problem into smaller, more manageable sub-problems. Example: Breaking down a game into separate tasks: character design, world creation, scoring system.

47
New cards
48
New cards
49
New cards

Pattern Recognition :: Identifying trends, similarities, or recurring patterns to create more efficient and reusable solutions.Example: All enemies have health and attack, so they can use a single "Enemy" template.

50
New cards
51
New cards
52
New cards

Abstraction :: Filtering out unnecessary details to focus only on the essential concepts. Example: For a character, storing their score and position, but ignoring their shoe size.

53
New cards
54
New cards
55
New cards
56
New cards

Algorithmic Design :: Developing a clear, step-by-step set of instructions to solve a problem