General terms for programming Flashcards

1
Q

What is a type?

A

A general term to determine the kind of value you’re using.

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

Give examples of types?

A

Strings, booleans, integers, characters, floating point numbers

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

What does an integer represent?

A

A whole number

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

What does floating point represent?

A

A number with fractional parts

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

What is a string?

A

A sequence of characters

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

What characterises a boolean expression?

A

It is either true or fale

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

True and False are special in what way?

A

They are their own special values that belong to type Bool

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

= is what?

A

An assignment operator

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

== is what?

A

relational operator to determine if the object to the left has the same value as the object to the right

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

what are the three logical operators

A

and, or, not

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

What do conditional statements allow?

A

Code blocks can be executed depending on certain scenarios

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

A header (if) followed by a block of code is what kidn of statement?

A

A compound statement

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

Alternatives (if, else) can be described as being…

A

branches

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

Multiple if statements in the form of elif can be described as being…

A

chained conditions

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

An if statement with another if statement is what?

A

Nested

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

What would you add to a Python print statement to keep the printing on one line

A

print(“the thing you want to print” ,end=” “)