exam 1 com sci

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

1/62

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.

63 Terms

1
New cards

print

displays whatever is the the ()’s

2
New cards

+

puts words together with no space

3
New cards

,

puts the words together with a space

4
New cards

variables

containers that hold data, must declare by giving it a name

5
New cards

string(str)

text

6
New cards

integer(int)

integers, whole number

7
New cards

float(float)

decimals

8
New cards

boolean(bool)

true/false

9
New cards

casting

tell the computer to treat one variable like a different type, use to change a number into a string for printing, or change a string to a number

10
New cards

input

accepts data from the user, returns what the user enters, so you need to assign it to a variable

11
New cards

a + b = 40

addition

12
New cards

a- b = 6

subtraction

13
New cards

a * b = 391

multiplication

14
New cards

a/b = 1.35294

division

15
New cards

a % b = 6

modulus, remainder after dividing

16
New cards

a ** b = 14105

exponentiation/ power

17
New cards

a // b = 1

floor division, how many times a number can go into a number

18
New cards

a (2) + b(happy) = 2happy

concatenation

19
New cards

b(happy) * c(3) = happyhappyhappy

repetition

20
New cards

a==b is false

equality

21
New cards

a !=b is true

inequality

22
New cards

a>b is true

greater than

23
New cards

a<b is false

less than

24
New cards

a>= b is true

greater than or equal to

25
New cards

a<=b is false

less than or equal to

26
New cards

a=b

assigns b to a

27
New cards

a += b

increments a bt b (same as a = a + b)

28
New cards

a -=b

decrements a by b (same as a = a - b)

29
New cards

a*=b

multiplies a by b and stores the result in a (same as a =a*b)

30
New cards

a/=b

divides a by b and stores the result in a (same as a = a/b)

31
New cards

a % = b

divides a by b and stores the remainder in a (same as a = a%b)

32
New cards

a **=b

raises a to the power b and stores the results in a (same as a=a**b)

33
New cards

a//=b

divides a by b and stores the floor of the result to a (same as a//b)

34
New cards

selection (conditionals)

executres one or more statements only if a certain condition is met

35
New cards

iteration

repeats one or more statements until a certain condition is met

36
New cards

nest

putting one inside another

37
New cards

stack

putting one below another

38
New cards

elif(else,if)

when you have more than two conditions, the first one gets an if, the last one gets an else, and the middle ones get elif

39
New cards

event control

repeat until a certain event occurs

40
New cards

count control

repeat a specific number of times

41
New cards

while

loops repeat indented statements for as long as the condition is true

42
New cards

for-in loop

iterates over a list or collection of things, useful for going through strings

43
New cards

subroutine

a program inside of a program, helps us organize our code and gives us stuff we can re-use

44
New cards

procedure

a subroutine that performs actions then returns to the point where it was called

45
New cards

function

a subroutine that performs an action and returns a value to the point where it was called

46
New cards

parameters

variables inside of a function’s ()’s

47
New cards

return

statements with a variable or value after them send the information back to where it was called

48
New cards

scope

variables made inside of a function cannot be seen outside of it

49
New cards

default values

parameters inside a subroutine can be defined to defaults values, will allow us to invoke the same subroutine in multiple ways

50
New cards

library

collection of pre-written and tested subroutines

51
New cards

decomposition

breaking down a large problem into smaller easier parts

52
New cards

abstraction

using patterns and creating a generalized solution

53
New cards

algorithm design

creating a plan that will implement a solution

54
New cards

debugging

improving the solution

55
New cards

algorithm

detailed sequence of steps that describes how to solve a problem or accomplish some task

56
New cards

problem statement

formal way to define the problem

57
New cards

flowcharts

diagrams that represent a workflow or a process, direction of execution is shown by arrows, different shaped blocks stand for different kinds of step

58
New cards

terminal block

oval, shows the start or end of the algorithm

59
New cards

process block

rectangle, contains one statement in which some action is performed

60
New cards

input/ output block

parallelogram, shows when data is entering/ leaving the algorithm

61
New cards

decision block

diamond, asks a question, only block that must have more than one path leading from it

62
New cards

loop

repetition in programming

63
New cards

pseudocode

used to represent programmer languages, uses structural conventions of a programming language