Sample questions
Question 1Easy
A data analyst asks AI to write a SQL query. What should they do next?
- Delete the original table
- Assume all joins are correct
- Run it on sample data and check the results make sense
- Send the query result straight to management as the final figure
Answer: C. Run it on sample data and check the results make sense
Explanation
AI-written queries can have wrong joins, filters or aggregations; checking results against known numbers catches them.
Step-by-step solution
- AI-written SQL can have wrong joins, filters or aggregations.
- Running it on sample data where the correct answer is known shows such errors.
- Compare the output with known numbers and check that it makes sense. The correct answer is C (Run it on sample data and check the results make sense).
Why the other options are wrong
- A. Deleting the original table is destructive and does not check the query.
- B. Assuming the joins are correct is the very risk that checking is meant to catch.
- D. Sending unchecked output as the final figure skips verification.
Tip: Test AI-written SQL on data where you already know the answer before trusting it.
Question 2Easy
AI is often used in testing to:
- Replace written product requirements
- Guarantee the product ships with zero bugs
- Write first drafts of automated test scripts
- Decide release dates
Answer: C. Write first drafts of automated test scripts
Explanation
AI drafts speed up automation, but testers verify that scripts are correct and meaningful.
Step-by-step solution
- AI is a helper in testing.
- It can draft test scripts that people then review and fix.
Why the other options are wrong
- A. Requirements still need people.
- B. No tool can guarantee zero bugs.
- D. Release dates are a business decision.
Tip: Draft with AI, verify yourself.
Question 3Easy
Which is a common use of AI by testers?
- Deleting failing tests
- Generating test case ideas and test data
- Approving releases with no human involvement at any stage
- Replacing all bug reports
Answer: B. Generating test case ideas and test data
Explanation
AI helps brainstorm scenarios and create varied inputs; testers still judge relevance and coverage.
Step-by-step solution
- AI creates test ideas and data for testers.
- Testers review and choose best options.
- This saves time and improves coverage.
- Human judgment is still needed for final decisions.
- Final answer: Generating test case ideas and test data.
Why the other options are wrong
- A. Deleting failing tests hides real bugs instead of fixing them, which is a bad use of AI.
- C. Approving releases with no human involvement at any stage removes the checks that testers rely on.
- D. AI does not replace bug reports; it can help draft them, but reports still matter for real issues.
Tip: AI aids in testing but doesn't replace human oversight.
Question 4Easy
How can AI help a UI designer?
- Choosing a brand name with legal clearance
- Guaranteeing accessibility compliance
- Replacing all usability testing with real users from now on, to save time
- Generating layout ideas or placeholder copy to explore quickly
Answer: D. Generating layout ideas or placeholder copy to explore quickly
Explanation
AI speeds up exploration, but usability, accessibility and legal checks still need people and proper processes.
Step-by-step solution
- AI can create layout ideas quickly for designers to try out.
- It can also generate placeholder text to fill space in designs.
- This lets designers explore many options without long waits.
- Usability and legal checks still need human input though.
- Accessibility compliance requires expert review as well.
- So AI helps speed up the design process but doesn't replace all tasks.
Why the other options are wrong
- A. Choosing a brand name with legal clearance needs legal checks, so AI cannot give that clearance.
- B. AI cannot guarantee accessibility compliance; that needs expert review and testing.
- C. AI does not replace real usability testing with users; those tests still matter.
Tip: Use AI for quick layout and copy ideas, but always check legal and accessibility requirements manually.
Question 5Medium
An AI agent proposes a Terraform change. Which step should come before applying it?
- Delete the state file
- Apply it straight away; you can always read the plan later if something breaks
- Run it in every region at once
- Review the plan output to see exactly what will change
Answer: D. Review the plan output to see exactly what will change
Explanation
terraform plan shows creations, changes and destructions; reviewing it prevents accidental deletions.
Step-by-step solution
- Terraform plan shows what will change.
- Review before applying.
Why the other options are wrong
- A. Never delete state.
- B. Apply only after review.
- C. Don't spread risk.
Tip: Plan, review, then apply.
Question 6Medium
AI generates a Dockerfile that runs the app as root and uses latest tags. What should a reviewer suggest?
- Add more RUN lines so that the image is more detailed and easier to debug later
- Remove the Dockerfile
- Pin image versions and run as a non-root user
- Nothing; latest is always most secure
Answer: C. Pin image versions and run as a non-root user
Explanation
Pinned versions make builds reproducible, and non-root users limit the impact of a container compromise.
Step-by-step solution
- Using
latest tags makes builds unstable as base images can change unexpectedly. - Running as root poses security risks if the container is compromised.
- Pinning versions ensures consistent and predictable build results.
- Non-root users reduce potential damage from container vulnerabilities.
- Reviewers should suggest pinning versions and using non-root users for better security and reliability.
- Final answer: Pin image versions and run as a non-root user.
Why the other options are wrong
- A. Adding RUN lines does not fix root or unpinned tags; it only adds size and steps.
- B. Removing the Dockerfile removes the app's build, which fixes nothing and is not a good review suggestion.
- D. Latest is not most secure; unpinned tags can change without warning and break builds.
Tip: Always pin image versions and avoid root access in containers for secure and reliable builds.
Question 7Medium
AI generates synthetic test data for a banking app. Why is synthetic data often preferred over copying production data?
- It avoids exposing real customers' personal information
- Production data is illegal to look at
- Synthetic data never contains edge cases
- It is always more realistic than real production data in every respect
Answer: A. It avoids exposing real customers' personal information
Explanation
Synthetic data lets you test without privacy risk; you still need to make sure it covers realistic edge cases.
Step-by-step solution
- Synthetic data mimics real data but doesn't include actual customer details.
- Using real production data risks exposing sensitive personal information.
- Copying real data can lead to privacy breaches and legal issues.
- Testing with synthetic data keeps customer data safe and compliant.
- Final answer: It avoids exposing real customers' personal information.
Why the other options are wrong
- B. Production data is not illegal to look at; the risk is privacy exposure, not a ban on viewing it.
- C. Synthetic data can include edge cases; it can be generated to cover them, so this is not true.
- D. Synthetic data is not always more realistic; it approximates real data and may miss real patterns.
Tip: Use synthetic data to avoid privacy risks in testing.
Question 8Medium
AI suggests a shell script line rm -rf $DIR/* where DIR might be empty. What could go wrong?
- It may expand to rm -rf /*, deleting from the root
- It will only delete hidden files
- Nothing, because rm safely ignores any empty or unset variable
- It will print a warning and stop
Answer: A. It may expand to rm -rf /*, deleting from the root
Explanation
An unset or empty variable turns the path into /*; guard with ${DIR:?} or check DIR first.
Step-by-step solution
- If DIR is empty, $DIR/* becomes /*.
- rm -rf /* deletes from root.
Why the other options are wrong
- B. It is not limited to hidden files.
- C. rm does not ignore empty variables.
- D. There is no warning.
Tip: Guard variables: ${DIR:?}.
Question 9Hard
An AI-generated Kubernetes manifest sets no resource limits on a container. What risk does this create?
- One pod can consume excessive CPU/memory and starve others
- Kubernetes will delete the namespace
- The pod will refuse to start on any cluster version without limits
- Logs will no longer be collected
Answer: A. One pod can consume excessive CPU/memory and starve others
Explanation
Without limits a misbehaving container can exhaust node resources; requests and limits keep workloads fair.
Step-by-step solution
- Resource limits prevent containers from using too much CPU/memory.
- Without limits, one pod can use all available resources.
- This causes other pods to get less resources and may crash.
- This is called resource starvation for other pods.
- The correct answer is A (One pod can consume excessive CPU/memory and starve others).
Why the other options are wrong
- B. Kubernetes does not delete namespaces because a container lacks limits; that is not the risk.
- C. Pods without limits still run on most clusters; missing limits is not a reason to refuse to start.
- D. Logs are not lost because of missing resource limits; the risk is resource starvation.
Tip: Always set resource limits to prevent resource starvation.
Question 10Hard
An AI writes a pandas line df[df.age > 30 & df.city == 'Pune']. What happens?
- It works exactly as intended in every version of pandas
- It returns all rows
- It sorts by age
- It fails or misbehaves because & binds tighter than >; each condition needs parentheses
Answer: D. It fails or misbehaves because & binds tighter than >; each condition needs parentheses
Explanation
Python evaluates 30 & df.city first; write (df.age > 30) & (df.city == 'Pune').
Step-by-step solution
- In Python, & binds tighter than > and ==.
- So 30 & df.city is evaluated first, which is not the intended comparison.
- The filter fails or gives wrong results instead of the intended rows.
- Wrap each condition in brackets: df[(df.age > 30) & (df.city == 'Pune')]. The correct answer is D.
Why the other options are wrong
- A. Mixing & with comparisons without brackets breaks in pandas, so it is not correct in every version.
- B. It does not return all rows; it fails or misbehaves.
- C. It does not sort by age; the expression is a faulty filter.
Tip: In pandas, wrap each condition in brackets before combining them with & or |.
Practise all 22 questions free
The full question bank with timed practice, progress tracking and Vidya, your AI tutor. Free, no ads.
Open this topic in the app →