programming Flashcards

1
Q

what is an input?

A

when a user types in data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is an output?

A

when data is outputted from the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does print do?

A

it outputs data for the user to see when running the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is a variable?

A

a piece of data that is saved in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what data type is string?

A

string is a data type saved as text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what data type is integer?

A

integer is a data type saved as a whole number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what data type is boolean?

A

boolean is a data type saved as true or false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what data type is float/real?

A

float/real is a data type saved as a decimal number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what data type is character?

A

character is a data type saved as a single letter/ string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does if else do in a program?

A

it gives a condition so if it is met then it will do something and the same if it is not met

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what is iteration?

A

a loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what is definite iteration?

A

a loop that will happen continuously

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

what is indefinite iteration?

A

a loop that ends and only goes on for so long

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

why do loops make programs more efficient?

A

as it lowers the amount of code that needs to be written

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is authentication?

A

confirming that something is true or real

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is while in python used for?

A

while is used to execute a block of code when the condition is true

17
Q

why is elif used in if…else?

A

to give multiple conditions

18
Q

what does this code do?
for i in range(4):
turtle.forward(100)
turtle.right(90)

A

it draws a square

19
Q

what happens in the shell window?

A

i is where all the outputs from the program appear and where the user can input data into the program

20
Q

what does an index for a string do?

A

it marks the position of each of the characters and gives them a number to remember this position