Programing - General Flashcards

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

What is a variable?

A

An empty area where data can be stored, Variables are named.

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

What is a constant?

A

A constant is like a variable, but its contents cannot be changed during use.

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

What is an arithmetic Operator?

A

An symbol used in arithmetic, such as + or -.

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

What is assignment?

A

Assignment is when data is assigned to a variable or constant.

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

What is a condition controlled loop?

A

A condition controlled loop is a function which loops code as long as a set condition is met.

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

What is a count controlled loop?

A

A count controlled loop is a function which loops code a set number of times.

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

What is sequencing?

A

Putting code in the correct order.

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

What is selection?

A

When a choice is offered (often using IF statements).

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

What is iteration?

A

The looping of instructions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
what do these operators do?
*
MOD
DIV
\+
-
^
==
!=
<
<=
>
>=
A
* - Multiplication
MOD - remainder from a division
DIV - Divide, no remainder
\+ - add
- - subtract
^ - to the power of
== - equal to
!= - not equal to
< - less than
<= - less than or equal to
> - more than
>= - more than or equal to
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are these data types?
Integer -

Real -

Boolean -

Character -

String -

A

Data types
Integer - A number with no fraction or decimal place.

Real - all numbers, basically. often written as ‘float’.

Boolean - Can only have 1 of 2 values, True or False.

Character - Stores a single leter, number, or symbol.

String - holds a list of characters any length. usually represented as “[text here]”.

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

what types of iteration are there?

A

Count controlled - Runs a specified number of times, an example would be: for i in range(0,5):

Condition controlled - Runs only as long as a specific condition id met. An example would be: While var1 > var2.

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

What operation is used to create a function/procedure?

A

‘def’ is used to create a function/procedure. an example would be: def AreaOfTriangle(a,b):

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