Data Science · Python What is the result of 'ab' * 3 in Python? A 'ababab' Correct answer B TypeError C 'aaabbb' D 'ab3' MCQSEXAM Show answer Read explanation
Data Science · Python With counts = defaultdict(int), what does counts['new'] return for a key never set before? A None B KeyError C 0 Correct answer D '' MCQSEXAM Show answer Read explanation
Data Science · Python What does the @dataclass decorator generate automatically for a class? A __init__, __repr__ and __eq__ methods Correct answer B A database table for the class C Getter and setter for each field D Type checking at runtime for fields MCQSEXAM Show answer Read explanation
Data Science · Python In Python 3, what does map(str, [1, 2, 3]) return? A The string '123' B A tuple of strings C The list ['1', '2', '3'] D A lazy map iterator Correct answer MCQSEXAM Show answer Read explanation
Data Science · Python What does a method decorated with @classmethod receive as its first argument? A No automatic argument B The class itself (cls) Correct answer C The parent module D The instance (self) MCQSEXAM Show answer Read explanation
Data Science · Python nums = [3, 1, 2]; result = nums.sort(). What is result? A True B [3, 1, 2] C [1, 2, 3] D None Correct answer MCQSEXAM Show answer Read explanation
Data Science · Python After a, *b = [1, 2, 3], what is the value of b? A [1, 2, 3] B [2, 3] Correct answer C 2 D (2, 3) MCQSEXAM Show answer Read explanation
Data Science · Python What does isinstance(True, int) return in Python? A None B TypeError C False D True Correct answer MCQSEXAM Show answer Read explanation
Data Science · Python Inside a nested function, which keyword lets you reassign a variable from the enclosing (outer) function? A nonlocal Correct answer B outer C static D global MCQSEXAM Show answer Read explanation
Data Science · Python What is the result of '-'.join(['a', 'b', 'c'])? A '-a-b-c-' B ['a-b-c'] C 'abc-' D 'a-b-c' Correct answer MCQSEXAM Show answer Read explanation
Data Science · Python What does any([0, '', None, 5]) return? A False B 5 C True Correct answer D None MCQSEXAM Show answer Read explanation
Data Science · Python What does {w: len(w) for w in ['hi', 'cat']} produce? A {2: 'hi', 3: 'cat'} B {2, 3} C {'hi': 2, 'cat': 3} Correct answer D [2, 3] MCQSEXAM Show answer Read explanation
Data Science · Quantum Computing in Data Science Qiskit is an open-source quantum computing SDK developed by: A IBM Correct answer B Microsoft C Google D Intel MCQSEXAM Show answer Read explanation
Data Science · Quantum Computing in Data Science A register of n qubits can be described by how many complex amplitudes? A 2ⁿ Correct answer B n C 2n D n² MCQSEXAM Show answer Read explanation
Data Science · Text Mining Search engines use an inverted index to: A Store documents in reverse alphabetical order B Map each term to the documents containing it Correct answer C Translate queries into other languages D Compress images found inside web pages MCQSEXAM Show answer Read explanation
Data Science · Text Mining Zipf's law in text corpora states that a word's frequency is roughly: A Proportional to the length of the word B Equal for all words in a large corpus C Inversely proportional to its rank Correct answer D Proportional to the square of its rank MCQSEXAM Show answer Read explanation
Data Science · Recurrent Neural Networks (RNNs) How are recurrent neural networks typically trained? A With closed-form least squares B With a genetic algorithm only C With k-means clustering of hidden states D With backpropagation through time (BPTT) Correct answer MCQSEXAM Show answer Read explanation
Data Science · Recurrent Neural Networks (RNNs) What allows an RNN to process sequences of any length with a fixed number of parameters? A A new layer is added for each extra word B The input is always cut to exactly ten tokens C Each time step trains a separate small model D The same weights are reused at every time step Correct answer MCQSEXAM Show answer Read explanation
Data Science · Recurrent Neural Networks (RNNs) In a sequence-to-sequence (seq2seq) model for translation, the encoder: A Checks the grammar of the translated output sentence B Compresses the input sentence into a context representation Correct answer C Counts word frequencies in the source sentence D Generates the translated sentence one word at a time MCQSEXAM Show answer Read explanation
Data Science · Neural Networks A dense layer has 10 inputs and 5 neurons, each with a bias. How many trainable parameters does it have? A 50 B 55 Correct answer C 15 D 60 MCQSEXAM Show answer Read explanation
Data Science · Neural Networks A dataset has 1,000 samples and the batch size is 100. How many weight updates (iterations) make up one epoch? A 10 Correct answer B 100 C 1 D 1,000 MCQSEXAM Show answer Read explanation
Data Science · Neural Networks The universal approximation theorem states that a feed-forward network with one hidden layer can: A Always find the global minimum during training B Solve any problem without an activation function C Approximate any continuous function, given enough units Correct answer D Learn any function from just a handful of examples MCQSEXAM Show answer Read explanation
Data Science · Gradient Boosting Machines (GBM) Which loss makes a gradient boosting regressor more robust to outliers than squared error? A Huber loss Correct answer B Log loss C Hinge loss D Squared loss MCQSEXAM Show answer Read explanation
Data Science · Gradient Boosting Machines (GBM) Histogram-based gradient boosting (as in LightGBM and XGBoost 'hist') speeds up training by: A Replacing trees with linear models B Removing half the trees after each round C Training every tree on a separate GPU D Bucketing feature values into discrete bins Correct answer MCQSEXAM Show answer Read explanation
Data Science · Gradient Boosting Machines (GBM) Setting subsample = 0.8 in a gradient boosting model means each tree: A Stops after reaching 80% training accuracy B Is trained on a random 80% of the rows Correct answer C Uses 80% of the features at every split D Is given 80% of the previous tree's weight MCQSEXAM Show answer Read explanation