Introduction To Programming Flashcards

1
Q

What are the five main data types of programming

A

Boolean, character, integer, floats/real, string

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

What is character “data type” in programming

A

Single character (number, letter or symbol)

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

What are the three main factors that decides which data type need to be used.

A

1- What you need to do with the data
2- What the end user needs
3- As what it needs to be stored in a in a file

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

Does Python sets the data type of the value you used automatically or you have to set it manually

A

Python does automatically

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

When does the data type is set when it comes to variable and constant

A

When you put a value in (variable, constant)

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

Why the data type should not be changed once’s it has been set for a variable or constant

A

Lead to error and inconsistency

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

What does it mean when we say that numbers in Python are immutable data types?

A

Data type representing a number once created it can not be change the original one but create a new one, and assign it to it

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

What is the meaning of immutable

A

When the value of number data type changes and creating a new object

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

In Python how is the character data type like (letter, number, symbol) treated

A

Treated like a string with single character

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

Why is there no special Python notation for each character type (letter, number, symbol)

A

Because Python uses string type for single and longer characters

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

What does the “type ()” function return

A

Return Data type of a value or variable

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

How constant should be named according to PEP8?

A

Uppercase words separated with underscore

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