Question bank

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

Power BIMedium
A scheduled refresh of an Import model sourced from an on-premises SQL Server fails with a gateway error. What fixes it?
aInstall and configure the on-premises data gateway in standard mode and bind the data source to the model
bRepublish the .pbix from Desktop
cSwitch the workspace licence from Pro to Premium
dGive report users Build permission on the semantic model
PythonMedium
What is printed?
gen = (x * 2 for x in range(3))
print(sum(gen), sum(gen))
a6 6
b6 0
c0 6
dTypeError
SQL / MySQLMedium
Which index can MySQL use for `WHERE status = 'PAID'` alone?
a(customer_id, status)
b(created_at, status)
c(customer_id, created_at, status)
d(status, created_at)
StatisticsMedium
What does this code estimate?
a = rng.beta(1 + 540, 1 + 11460, 100_000)
b = rng.beta(1 + 624, 1 + 11376, 100_000)
print((b > a).mean())
aThe p-value of a z-test
bThe required sample size
cThe posterior probability that B's conversion rate exceeds A's
dThe standard error of the difference
PythonMedium
How do you handle an exception?
acatch / throw
bif / error
ctry / except
dhandle / rescue
SQL / MySQLMedium
In MySQL 8, how does `TRUNCATE TABLE orders` differ from `DELETE FROM orders`?
aTRUNCATE only removes rows added today
bTRUNCATE keeps the rows but hides them
cTRUNCATE drops and recreates the table, resets AUTO_INCREMENT and cannot be rolled back
dThere is no difference
PandasMedium
By default, which columns does `df.describe()` summarise?
aEvery column
bOnly object columns
cOnly the index
dOnly the numeric columns
Machine LearningMedium
A `city` column holds Pune, Delhi and Mumbai with no natural order. Which encoding fits?
aLabel encoding as 0, 1, 2
bDropping the column
cOne-hot encoding
dStandard scaling
DjangoMedium
Which call raises `Product.DoesNotExist` when nothing matches?
aProduct.objects.filter(pk=5)
bProduct.objects.get(pk=5)
cProduct.objects.all()
dProduct.objects.exclude(pk=5)
Large Language ModelsMedium
Which prompting technique does this use?
Classify the sentiment.
Review: 'Fast delivery, great packaging' -> positive
Review: 'Item arrived broken' -> negative
Review: 'Exactly as described' ->
aZero-shot prompting
bFine-tuning
cFew-shot prompting
dChain-of-thought prompting
Artificial IntelligenceMedium
In a tool-calling agent, what happens immediately after the model returns a tool call?
if response.stop_reason == "tool_use":
    result = run_tool(call.name, call.input)
    messages.append({"role": "user", "content": tool_result(call.id, result)})
aThe loop ends and the tool result is shown to the user
bThe model executes the function inside itself
cThe tool result replaces the system prompt
dYour code runs the function and appends its result, then calls the model again
APIsMedium
Which OAuth2 flow suits a backend service calling another API with no user involved?
aClient Credentials
bAuthorization Code with PKCE
cImplicit
dResource Owner Password
Data ScienceMedium
What does this feature-engineering step create?
sales = sales.assign(
    festive=lambda d: d["date"].between("2025-10-01", "2025-11-30")
)
aA string column with the festival name
bA boolean flag marking rows dated in Oct–Nov 2025
cA new DataFrame with only festive rows
dAn error, because assign cannot take lambdas
Deep LearningMedium
You have 400 labelled images across 4 classes. What is the best first approach?
aTrain a deep CNN from scratch for 200 epochs
bUse an RNN over the pixel rows
cTrain a transformer from scratch
dUse a pretrained backbone, freeze it, and train a new classification head
DjangoMedium
Why should `success_url` on a class-based view use `reverse_lazy`?
areverse() is deprecated
bIt caches the URL for faster redirects
cIt works with POST only
dThe URLconf isn't loaded when the class attribute is evaluated at import time