General knowledge Flashcards

1
Q

What is a string?

A

A string is a string or sequence of characters/ textual data

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

What is parenthesis?

A

()

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

What are quotes

A

” “

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

What does the function “print” do?

A

it displays in the terminal window whatever we’ve put between the parenthesis

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

What is a variable?

A

data that is temporarily stored in the computers memory -
Python has no command for declaring a variable. A variable is created the moment you first assign a value to it.

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

What is a value?

A

the contents of a variable

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

How does the programme get executed?

A

From top to bottom

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

If you want to use multiple words in a variable what are they separated by?

A

Using an underscore 🔸_🔸

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

What value does a “Boolean” hold

A

True/ False

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

What value does an “Integer” hold

A

a whole number

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

What does it mean that the language is case sensitive?

A

it means lowercase and uppercase characters affect the language

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

When creating a boolean what character must the initial letter start with

A

an uppercase character

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

What does the function “input” do?

A

It reads value from the terminal window

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

What does the “int” function do?

A

It can convert a value to an integer. E.G str to int

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

Why would an error code return if you tried to subtract a string from an integer?

A

Because python doesn’t know how to automatically convert values. You must convert them yourself

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

What is a float?

A

It is a value of a decimal number

17
Q

What are the abbreviations for integer, boolean, float and string and what are their uses

A

int, bool, float, str - for converting the types of variables