Python Basics-Questions and Answers
Python Basics-Questions and Answers What does it mean when it is said that python is strongly typed? -ANSWER-The language restricts how many different types can interact. Every change of type requires an explicit conversion. What does it mean when it is said that python is a dynamic language? -ANSWER-values stored by variables have types while the variable itself does not. what is the difference between keywords and reserved words? -ANSWER-Keywords are a type of reserved words that serve a specific purpose in the context of the language, while reserved words are specific strings of characters the are reserved for use by the language can a reserve word be a keyword? -ANSWER-it can, but it doesn't have to be. can a keyword be a reserved word? -ANSWER-yes, it has to be what is a variable? -ANSWER-user-defined names that reference a portion of memory where data is stored as a particular type. what are the rules of variable naming? -ANSWER-A variable name cannot be a reserved word, it cannot contain space, it must start with a letter, and it may contain letters in numbers. In python does This_name = this_name = THIS_NAME? -ANSWER-No, python is case sensitive. how are constant variables conventionally written? -ANSWER-Entirely in uppercase Which keywords start with an uppercase letter? -ANSWER-True, False, None. what is i used for? -ANSWER-counting loop iterations what are the three basic datatypes? -ANSWER-int, float, string int -ANSWER-stores integer numbers float -ANSWER-stores floating point numbers (imprecise) string -ANSWER-holds text data functions -ANSWER-callable block of code that performs some computation. It may return a value
Written for
- Institution
- Programming for python language..
- Course
- Programming for python language..
Document information
- Uploaded on
- March 28, 2024
- Number of pages
- 3
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- rules of variable naming
- basic datatypes
- integer division
- variable
-
python basics questions and answers
Also available in package deal