KnowledgeBoat Logo

Class - 12 CBSE Computer Science — Assertion Reason Type Questions

  • Python Libraries

    Assertion. If an item is imported through from <module> import <item> statement then you do not use the module name along with the imported item.

    Reason. The from <module> import command modifies the namespace of the program and adds the imported item to it.


  • Python Libraries

    Assertion. Python's built-in functions, which are part of the standard Python library, can directly be used without specifying their module name.

    Reason. Python's standard library's built-in functions are made available by default in the namespace of a program.


  • Python Libraries

    Assertion. Python offers two statements to import items into the current program : import and from <module> import, which work identically.

    Reason. Both import and from <module> import bring the imported items into the current program.


  • Python Libraries

    Assertion(A): Python Standard Library consists of various modules.

    Reasoning(R): A function in a module is used to simplify the code and avoids repetition.

    1. Both A and R are true, and R is the correct explanation of A.
    2. Both A and R are true, and R is not the correct explanation of A.
    3. A is true but R is false.
    4. A is false but R is true.


  • Python File Handling

    Assertion. Python is said to have broadly two types of files - binary and text files, even when there are CSV and TSV files also.

    Reason. The CSV and TSV are types of delimited text files only where the delimiters are comma and tab respectively.


  • Python File Handling

    Assertion. The file modes "r", "w", "a" work with text files, CSV files and TSV files alike.

    Reason. The CSV and TSV are types of delimited text files only.


  • Python File Handling

    Assertion. The file modes "r", "w", "a" also reveal the type of file these are being used with.

    Reason. The binary file modes have 'b' suffix with regular file modes.


  • Python File Handling

    Assertion. 'Pickling' is the process whereby a Python object hierarchy is converted into a byte-stream.

    Reason. A binary file works with byte-streams.


  • Python File Handling

    Assertion. 'Pickling' is the process whereby a Python object hierarchy is converted into a byte-stream.

    Reason. Pickling process is used to work with binary files as a binary file works with byte-streams.


  • Python File Handling

    Assertion. Every open file maintains a file-pointer and keeps track of its position after every operation.

    Reason. Every read and write operation takes place at the current position of the file pointer.


Showing 41 - 50 of 201 Questions