Programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does if and else do in a program?

A

Checks the conditions of a question or it checks the answers.

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

What is an integer?

A

A whole number

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

what is a float?

A

A decimal number

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

What is a string?

A

A piece of text

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

How many bytes does an integer piece of data use up?

A

2 bytes or 4 bytes

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

What is an operator?

A

Used to assign values or compare 2 values for example
name = input(‘What is your name’)
or
5 == 5 (this evaluates to true)

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

What is selection?

A

Where the user or the programme inputs data

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

What is a Variable?

A

A piece of data that can change

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

What is a constant?

A

A piece of data that can’t change

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

What is iteration

A

A programme that can repeat itself

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

What is a while loop?

A

When a condition is true, the programme repeats itself

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

What is an array?

A

A variable with multiple values

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

What is a module?

A

A module is something that you can import into your code such as turtle and datetime

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

Which comparison operater means “greater than”?

A

x > y

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

Which comparison operator means “smaller than”?

A

x < y

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

Which comparison operator means “greater than or equal to”

A

x => y

17
Q

which module is used to import the date and the time?

A

import datetime

18
Q

What is a user defined variable?

A

A variable where the user chooses the variable

19
Q

What is a programme defined variable?

A

A variable where the programme has already chosen it

20
Q

What is a concatenation?

A

Where strings are joined together

21
Q

What is string manipulation?

A

When the programme can change the string how ever it wants to such as .lower() which makes the letters in a string all lower case

22
Q

What is arithmetic?

A

Where the programme can do different calculations

23
Q

What does the module “turtle” do?

A

It makes it so the programme can draw stuff

24
Q

Which comparison operator means equal to?

A

= or ==

25
Q

Which comparison operator means smaller than or equal to?

A

x <= y

26
Q

How would you use else?

A

If the user inputs something the programme doesn’t ask for then that piece of data runs