Quick Revision

GK One-Line Question & Answer

15541+ short questions with short answers, covering every category and sub-category on the site — no long articles to scroll through. Good for a fast recap before an exam, or a few minutes of daily practice.

Computer Fundamentals → Introduction to Computer 37

Inheritance in Python is defined as?
class Child(Parent):
click to copy
Python multiple inheritance is?
Supported — class C(A, B): inherits from both A and B
click to copy
MRO (Method Resolution Order) in Python?
Order in which Python searches classes for method/attribute in inheritance
click to copy
Python __str__ method is called by?
print() function and str() conversion
click to copy
What is the output of 5//2 in Python?
2
click to copy
Python operator ** is used for?
Exponentiation (power)
click to copy
Which Python module is used for regular expressions?
re
click to copy
os.path.join() in Python is used for?
Building file paths in an OS-independent way
click to copy
Which Python library is used for HTTP requests?
requests
click to copy
JSON module in Python provides?
Encoding/decoding JSON data (json.dumps, json.loads)
click to copy
Python f-strings (f'Hello {name}') provide?
Inline expression evaluation within strings (formatted string literals)
click to copy
Which Python keyword checks membership in a sequence?
in
click to copy
enumerate() in Python?
Returns index-value pairs when iterating over a sequence
click to copy
What is the output of bool('') in Python?
False
click to copy
Python None is?
Null equivalent — absence of value
click to copy
Which sorting method does Python's list.sort() use?
Timsort (hybrid merge sort + insertion sort)
click to copy
zip() function in Python?
Combines multiple iterables element-by-element into tuples
click to copy
map() function in Python?
Applies a function to every element of an iterable
click to copy
filter() function in Python?
Returns elements from iterable where function returns True
click to copy
reduce() function is imported from?
functools module
click to copy
Python set is?
Unordered, no duplicates, mutable
click to copy
frozenset in Python is?
Immutable version of set — hashable, can be used as dictionary key
click to copy
deque in Python (collections.deque)?
Double-ended queue — efficient append/pop from both ends
click to copy
defaultdict in Python?
Dictionary with default value for missing keys — no KeyError
click to copy
Counter in Python (collections.Counter)?
Dictionary subclass counting hashable objects by frequency
click to copy
Python's heapq module provides?
Min-heap operations on a regular list
click to copy
Which Python module supports regular expressions?
re
click to copy
What does 'is' operator check in Python?
Identity — whether two variables point to same object in memory
click to copy
Pickling in Python?
Serializing Python objects to byte stream for storage/transmission
click to copy
__slots__ in Python class?
Restricts instance attributes and reduces memory usage
click to copy
Abstract class in Python is created using?
ABC module (from abc import ABC, abstractmethod)
click to copy
Python @property decorator?
Allows a method to be accessed like an attribute (getter/setter)
click to copy
Which Python framework is used for web development?
Django and Flask
click to copy
What is a zero-day exploit?
Attack using vulnerability unknown to vendor with no patch available
click to copy
Multi-factor authentication (MFA) categories are?
Something you know, have, and are (knowledge, possession, inherence)
click to copy
Which port does HTTPS use?
443
click to copy
SSL/TLS handshake purpose is?
Negotiate encryption parameters and exchange keys before secure communication
click to copy

Computer Fundamentals → Software and Hardware 1

Python's GIL (Global Interpreter Lock) affects?
Multi-threading — prevents true parallel execution of Python threads in CPython
click to copy

Computer Fundamentals → Computer Security 1

Which type of malware encrypts files and demands payment?
Ransomware
click to copy

Computer Fundamentals → Internet Basics 1

Phishing email characteristics include?
Urgent language, spoofed sender, suspicious links, requests credentials
click to copy