Question bank

Filter questions by subject, topic and difficulty. Open any question to answer it and see the explanation.

7,992 questions found Show 20 · 50 per page
#QuestionSubject and topicDifficulty
2581 What does the readlines() method return? Computer Science/Informatics Practices
Text files
Easy
2582 A file contains the text PYTHON PROGRAM. After f = open(...) in read mode, s = f.read(6) is executed. What is… Computer Science/Informatics Practices
Text files
Medium
2583 For the same file containing PYTHON PROGRAM, f.seek(7) is followed by print(f.read(3)). What is printed? Computer Science/Informatics Practices
Text files
Medium
2584 A file has lines one, two and three. It is opened with 'w' mode, f.write("x") is executed and the file is clo… Computer Science/Informatics Practices
Text files
Hard
2585 Which module is used in Python to store objects such as lists in a binary file? Computer Science/Informatics Practices
Binary files
Easy
2586 Which file mode should be used to write pickled data to a new binary file? Computer Science/Informatics Practices
Binary files
Easy
2587 What is the correct form of the statement to write a dictionary d into the binary file object f? Computer Science/Informatics Practices
Binary files
Medium
2588 The process of converting a Python object into a byte stream is called Computer Science/Informatics Practices
Binary files
Medium
2589 A program writes a list and then a dictionary with two pickle.dump() calls, then reads the file with pickle.l… Computer Science/Informatics Practices
Binary files
Hard
2590 Which principle does a stack follow? Computer Science/Informatics Practices
Stack
Easy
2591 Removing an element from an empty stack is called Computer Science/Informatics Practices
Stack
Easy
2592 Starting with an empty Python list s, the operations s.append(10), s.append(20), s.pop(), s.append(30), s.app… Computer Science/Informatics Practices
Stack
Medium
2593 Which feature of a web browser is a typical application of a stack? Computer Science/Informatics Practices
Stack
Medium
2594 The characters of "CAT" are pushed one by one onto a stack and then all popped and joined in the order popped… Computer Science/Informatics Practices
Stack
Hard
2595 What is the postfix form of the infix expression A + B * C? Computer Science/Informatics Practices
Expression notation
Easy
2596 Which data structure is used to evaluate a postfix expression? Computer Science/Informatics Practices
Expression notation
Easy
2597 What is the value of the postfix expression 4 5 + 3 2 − *? Computer Science/Informatics Practices
Expression notation
Medium
2598 What is the postfix form of (A + B) * (C − D)? Computer Science/Informatics Practices
Expression notation
Medium
2599 What is the value of the postfix expression 8 2 3 * − 4 +? Computer Science/Informatics Practices
Expression notation
Hard
2600 Which principle does a queue follow? Computer Science/Informatics Practices
Queue
Easy