Computer Science
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.
Python Funda
2 Likes
Answer
Both A and R are true and R is the correct explanation of A.
Explanation
Comments are non-executable statements in a script that are ignored by the Python interpreter and, therefore, have no effect on the actual output of the code. They are used to explain Python code and make it more readable and understandable for humans. Essentially, comments are used to include remarks within the code.
Answered By
1 Like
Related Questions
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.
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): A set of valid characters recognized by Python constitutes a character set.
Reasoning (R): Character set in Python is a subset of Python tokens.
- 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): 'Rollnumber' and 'rollnumber' are same identifiers.
Reasoning (R): Python is a case-sensitive language.
- 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.