Question bank

Pick an answer to see if you're right — with an explanation.

Git & GitHubHard
What does `git bisect run` use to decide whether each commit is good or bad?
git bisect start HEAD v2.1.0
git bisect run python manage.py test billing
aThe commit message
bWhether the files changed
cThe exit code of the command: 0 is good, non-zero is bad
dThe author of the commit
Large Language ModelsHard
When is fine-tuning the most justified choice?
aTo teach the model this morning's stock levels
bBefore trying any prompt changes
cWhen evaluations show prompting and RAG cannot achieve a required consistent format or narrow skill at scale
dTo stop prompt injection completely
Machine LearningHard
You `joblib.dump` a fitted pipeline with scikit-learn 1.5 and load it in production. What is the safest practice?
aLoad it with any newer scikit-learn version
bConvert it to CSV first
cPin the same library versions in production and only load files from trusted sources
dRe-fit the pipeline on each request
MatplotlibHard
You plot daily sales where the date column holds strings like '05-04-2025'. Ticks are crowded and the spacing ignores missing days. What is the best fix?
aRotate the labels 90 degrees
bConvert with pd.to_datetime(col, dayfirst=True) and sort before plotting
cUse a bar chart instead
dSet plt.xticks([]) to hide labels
NumPyHard
After `v = a.reshape(2, 6)` on a contiguous 12-element array `a`, you run `v[0, 0] = 99`. What happens to `a[0]`?
aIt stays unchanged because reshape copies
bIt raises an error because views are read-only
cIt becomes NaN
dIt also becomes 99 because v is a view sharing memory
PandasHard
Which statement about `df[df['city'] == 'Pune']['amount'] = 0` is correct?
aIt reliably sets Pune amounts to 0
bIt raises a SyntaxError
cIt deletes Pune rows
dIt may modify a temporary copy, leaving df unchanged; use df.loc[mask, 'amount'] = 0
Power BIHard
On 12 September, `Total Sales` covers 12 days but `SAMEPERIODLASTYEAR` returns all 30 days of last September, making YoY look awful. What is the correct fix?
aRestrict the prior-year measure to the same number of elapsed days, e.g. by adding a filter up to EDATE(MAX(Sales[InvoiceDate]), -12)
bReplace SAMEPERIODLASTYEAR with PREVIOUSYEAR
cSet the date table's end date to today so future days disappear
dChange the relationship to bi-directional so filters flow back to the date table
PythonHard
What does this print?
def add(item, bucket=[]):
    bucket.append(item)
    return bucket
add(1)
print(add(2))
a[2]
b[1, 2]
c[1]
d[]
SQL / MySQLHard
With `SUM(revenue) OVER (PARTITION BY branch ORDER BY month)` and no explicit frame, what is computed?
aTotal revenue of the branch on every row
bRevenue of the current month only
cA running total from the branch's first month up to the current month
dTotal revenue across all branches
StatisticsHard
A test planned a 50/50 split but recorded 51,800 vs 48,200 users. What should you do first?
aInvestigate a sample ratio mismatch before trusting any result
bDeclare the larger group the winner
cReweight the results and continue
dIgnore it; splits never match exactly