Computer Science
Assertion (A): Python is a dynamically typed language.
Reasoning (R): The data type of a variable is declared as per the type of value assigned to it.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Python Funda
1 Like
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
In Python, the data type of a variable is determined by the type of value assigned to it, and it can change if the value assigned to the variable changes. This behavior is known as dynamic typing, meaning the type of the variable is not fixed and is decided at runtime based on the assigned value. Hence, Python is a dynamically typed language.
Answered By
1 Like
Related Questions
What will be the output of the following Python code?
>>> a=72.55 >>> b=10 >>> c=int(a + b) >>> c
- 72.55
- 72
- 82
- None of these
Assertion (A): Each component of a programming statement is known as a token.
Reasoning (R): Token is not executed by Python interpreter, only used in the program coding.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): In Python, strings, lists and tuples are called Sequences.
Reasoning (R): Sequence is referred to as an ordered collection of values having similar or different data types.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Assertion (A): Comments are non-executable statements that are ignored by the interpreter.
Reasoning (R): Comments are used to explain the code and to make it more informative for the users. They are basically statements used to put remarks.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.