
GitHubCopilot Certification
Domain 4Objective 2
Engineer Prompts for Performance GH-300 Practice Questions (Page 4)
Part of the Apply prompt engineering and context crafting domain, which accounts for 10-15% of the GH-300 exam.
19questions here
4free pages
3concepts
10-15%of the exam
Questions 16–19
- 16
A developer is using GitHub Copilot to generate a bash script that backs up a directory. The first prompt, "Write a bash script to backup a directory," produced a script that uses `cp -r`. The developer wants a script that creates a compressed tar archive with a timestamp in the filename. What should the developer do?
Select an answer first - 17
A developer is using GitHub Copilot Chat to refactor a large Python module. In the first turn, they ask, "Explain the main function in this module." Copilot provides a detailed explanation. In the next turn, the developer wants to split the main function into smaller helper functions. The developer also wants to ensure the new functions are well-documented. What is the best follow-up prompt?
Select an answer first - 18
A developer is using GitHub Copilot Chat to generate a SQL query. The first prompt, "Write a SQL query to get user data," produced a generic `SELECT * FROM users`. The developer needs a query that returns only active users created in the last 30 days, ordered by creation date. Following the prompt process flow, what should the developer do next?
Select an answer first - 19
A developer is using GitHub Copilot Chat to generate a regular expression to validate an email address. The developer wants to ensure the regex is robust and handles common formats. Which prompt is the most effective?
Select an answer first
Finished these 4 questions?
Review the revealed explanations, or continue through the curriculum.
No more pagesBack to GH-300
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by GitHub. “GH-300” is a trademark of its owner, used for identification only.