Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
GitHub logo

GitHubCopilot Certification

Domain 4Objective 2

Engineer Prompts for Performance GH-300 Practice Questions (Page 1)

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 1–5

  1. 1expert · hard

    A developer is using GitHub Copilot Chat to generate a complex algorithm. The first prompt, "Write a function to find the shortest path in a graph," produced a basic Dijkstra implementation. The developer needs the function to also handle negative edge weights and return the path, not just the distance. The developer also wants to use the chat history to refine the solution. What is the best approach?

    Select an answer first
  2. 2expert · hard

    A developer is using GitHub Copilot to generate a Python function that calculates the Fibonacci sequence. The developer wants the function to be efficient and handle large numbers. The first prompt, "Write a Fibonacci function," produced a recursive implementation that is slow for large inputs. What should the developer do to get a more efficient implementation?

    Select an answer first
  3. 3foundation · easy

    When writing a prompt for GitHub Copilot to generate a function that calculates the total price of items in a cart, which prompt best applies the principle of specificity?

    Select an answer first
  4. 4expert · hard

    A developer is using GitHub Copilot Chat to generate a complex SQL query that involves multiple joins and a subquery. The first prompt, "Write a SQL query to get customer orders," produced a simple `SELECT * FROM orders`. The developer needs a query that returns customer names, order totals, and only orders placed in the last year. The developer also wants to use a CTE for readability. Which sequence of prompts best follows the prompt process flow?

    Select an answer first
  5. 5application · medium

    A developer is using GitHub Copilot in Visual Studio Code to write a Python function that parses a custom log format. The log lines look like: `2024-05-01 12:33:45 ERROR user123 failed to connect to db`. The developer wants Copilot to generate a parser that extracts the timestamp, level, user ID, and message into a dictionary. Which prompt best follows prompt engineering principles for this task?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

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.