Introduction To Programming Flashcards
What are the five main data types of programming
Boolean, character, integer, floats/real, string
What is character “data type” in programming
Single character (number, letter or symbol)
What are the three main factors that decides which data type need to be used.
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
Does Python sets the data type of the value you used automatically or you have to set it manually
Python does automatically
When does the data type is set when it comes to variable and constant
When you put a value in (variable, constant)
Why the data type should not be changed once’s it has been set for a variable or constant
Lead to error and inconsistency
What does it mean when we say that numbers in Python are immutable data types?
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
What is the meaning of immutable
When the value of number data type changes and creating a new object
In Python how is the character data type like (letter, number, symbol) treated
Treated like a string with single character
Why is there no special Python notation for each character type (letter, number, symbol)
Because Python uses string type for single and longer characters
What does the “type ()” function return
Return Data type of a value or variable
How constant should be named according to PEP8?
Uppercase words separated with underscore