GitHub Copilot Practice Test

### Is GitHub Copilot free to use for everyone? > https://github.com/features/copilot/plans 1. [ ] No 1. [X] Yes ### Which option below is NOT a possible way to grant access to Copilot for members of an organization? > Article Grant access to Copilot for members of an organization -https://docs.github.com/en/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/granting-access-to-copilot-for-members-of-your-organization 1. [x] As a member of an Organization, you can enable Copilot directly from your account settings. 1. [ ] Via your Enterprise settings, enable GitHub Copilot for selected organizations or all organizations. 1. [ ] Via your Organizations settings, enable GitHub Copilot for either selected teams or users or the entire organization. 1. [ ] You can use GitHub's REST API to grant access to GitHub Copilot for teams, or specific users, in your organization. ### What IDEs does GitHub Copilot support? (Choose two.) > https://docs.github.com/en/copilot/using-github-copilot/getting-code-suggestions-in-your-ide-with-github-copilot - [x] Visual Studio Code, Xcode, Vim/NeoVim - [x] Azure Data Studio, Visual Studio, IntelliJ IDEA - [ ] Visual Studio, NetBeans, Eclipse - [ ] Visual Studio, BlueJ, NetBeans ### What command is used to install the GitHub Copilot extension on the CLI? > https://docs.github.com/en/copilot/managing-copilot/configure-personal-settings/installing-github-copilot-in-the-cli 1. [x] gh extension install github/gh-copilot 1. [ ] gh copilot install 1. [ ] gh copilot setup 1. [ ] gh extension add copilot ### What are some of the principles of Prompt Engineering? (Choose three.) > https://docs.github.com/en/copilot/using-github-copilot/prompt-engineering-for-github-copilot - [x] Focus on a single, well-defined task - [x] Ensure instructions are detailed and explicit - [x] Provide rich context for AI - [ ] Write long, complex instructions > If you want Copilot to complete a complex or large task, break the task into multiple simple, small tasks. ### How can you exclude specific files from GitHub Copilot? > https://docs.github.com/en/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot 1. [ ] Editing the file .gitignore > .gitignore is used to exclude the file from git, not copilot 1. [x] Browsing to the repository settings on GitHub and adding the paths to exclude 1. [ ] Configuring exclusions in the Copilot configuration file 1. [ ] Using a command in the terminal ### Which is true about Copilot's Content exclusions? (Choose two) > https://docs.github.com/en/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot - [x] Context exclusions can be configured at the repository and organization level - [x] Copilot offers different plans with privacy considerations - [ ] Copilot completely ignores excluded files > Copilot may use information from an excluded file if the information is provided by the IDE. - [ ] Content exclusions do not affect code completion - [ ] Content exclusions are applied instantly > After you add or change content exclusions, it can take up to 30 minutes to take effect ### Which of the following describes the GitHub Copilot Editor configuration file? > https://docs.github.com/en/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot 1. [ ] A JSON file with security settings 1. [x] A Markdown file with natural language instructions for customizing Copilot Chat responses 1. [ ] A YAML file with build instructions 1. [ ] An XML file with deploy settings ### Which of the following describes how to use the GitHub Copilot's Productivity API? > https://docs.github.com/en/copilot/rolling-out-github-copilot-at-scale/analyzing-usage-over-time-with-the-copilot-metrics-api 1. [ ] To collect audit logs 1. [ ] To exclude specific files 1. [x] To collect usage metrics from organization members 1. [ ] To automatically update Copilot ### Which of the following integrates GitHub Copilot Chat with external tools? > https://docs.github.com/en/enterprise-cloud@latest/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat 1. [x] GitHub Copilot Extensions 1. [ ] GitHub Copilot Marketplace 1. [ ] GitHub Copilot Integrations 1. [ ] GitHub Copilot Open ### How can you provide GitHub Copilot with context to generate tailored responses for your repository? > https://docs.github.com/en/enterprise-cloud@latest/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot 1. [x] By creating a file named `.github/copilot-instructions.md` in the repository 1. [ ] By sending an email to GitHub support with your project details 1. [ ] By modifying the `.gitconfig` file to include custom instructions > Modifying the `.gitconfig` file does not provide custom instructions to GitHub Copilot. 1. [ ] By creating a GitHub issue named `copilot-instructions` in the repository with the necessary context > Creating a GitHub issue does not provide custom instructions to GitHub Copilot. ### Can GitHub Copilot use semantic information from a file that is ignored by GitHub Copilot content exclusions? > https://docs.github.com/en/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot#limitations-of-content-exclusions 1. [x] Yes, if the information is provided by the IDE indirectly. 1. [ ] No, it will ignore all information from excluded files. > It's possible that Copilot may use semantic information from an excluded file if the information is provided by the IDE indirectly. Examples of such content include type information and hover-over definitions for symbols used in code, as well as general project properties such as build configuration information. ### What happens when you exclude content from GitHub Copilot? (Choose two) > https://docs.github.com/en/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot#about-content-exclusions-for-copilot - [x] Code completion will not be available in the affected files. - [x] The content in affected files will not inform code completion suggestions in other files. - [ ] The content in affected files will continue to inform GitHub Copilot Chat's responses. - [ ] Code completion will be unaffected in the affected files. ### What is the easiest way to get started with GitHub Copilot? > https://docs.github.com/en/copilot/using-github-copilot/getting-started-with-github-copilot 1. [ ] Request access from GitHub Support and wait for approval before using GitHub Copilot. 1. [ ] Use the Copilot website and paste your code when asking for suggestions. 1. [x] Install the Copilot extension in your preferred environment, such as Visual Studio Code. 1. [ ] Create a new public GitHub repo and enable Copilot to scan your code and make suggestions. ### What does GitHub Copilot analyze to offer relevant suggestions as you are developing new code? > https://docs.github.com/en/copilot/using-github-copilot/best-practices-for-using-github-copilot#guide-copilot-towards-helpful-outputs 1. [ ] Analyzes the context in all files within the repository. 1. [x] Analyzes the context in the current file and related files. 1. [ ] Analyzes only the context within the current file. 1. [ ] Analyzes only the context within the current line of code. ### Which of the following options best describes GitHub Copilot? > https://docs.github.com/en/copilot/about-github-copilot/what-is-github-copilot 1. [x] An AI coding assistant that helps developers by suggesting code and completing code snippets. 1. [ ] A version control system that tracks and manages changes in a codebase. 1. [ ] A code editor that provides debugging and error-checking features. 1. [ ] A tool that automatically tests and deploys code to production environments. ### How does GitHub Copilot handle data retention for code suggestions in the IDE? > https://resources.github.com/learn/pathways/copilot/essentials/how-github-copilot-handles-data/ 1. [x] Suggestions are held temporarily in memory and discarded after use, not written to disk 1. [ ] All suggestions are permanently stored in a local database for future reference 1. [ ] Suggestions are automatically saved to GitHub repositories for version control 1. [ ] Code snippets are cached on disk for 30 days before being deleted ### Which steps occur when GitHub Copilot's proxy service processes a prompt? > https://resources.github.com/learn/pathways/copilot/essentials/how-github-copilot-handles-data/ 1. [x] Tests for toxic language, relevance checks, and detection of prompt hacking attempts 1. [ ] Translation to multiple programming languages and syntax validation 1. [ ] Automatic code compilation and execution in a sandbox environment 1. [ ] Direct transmission to public repositories for reference checking ### Which set of principles correctly represents Microsoft's six key principles for Responsible AI that guide GitHub Copilot's development? > https://learn.microsoft.com/en-us/training/modules/responsible-ai-with-github-copilot/3-six-principles-of-responsible-ai 1. [x] Fairness, Reliability and Safety, Privacy and Security, Inclusiveness, Transparency, and Accountability 1. [ ] Efficiency, Speed, Accuracy, Innovation, Reliability, and Security 1. [ ] Privacy, Performance, Accessibility, Scalability, Maintainability, and Testing 1. [ ] Security, Development, Operations, Maintenance, Support, and Documentation ### Which of the following is a potential benefit of using GitHub Copilot to enhance developer workflows? > https://docs.github.com/en/copilot 1. [x] It can suggest code snippets to increase developer productivity. 1. [ ] It completely replaces the need for code review in every project. 1. [ ] It automatically merges pull requests without human approval. 1. [ ] It only works with software written in a single programming language. ### Which statement correctly describes GitHub Copilot's CLI command functionality? > https://docs.github.com/en/copilot/using-github-copilot/using-github-copilot-in-the-command-line 1. [x] Users can get command explanations using 'gh copilot explain' and command suggestions using 'gh copilot suggest' 1. [ ] Commands are automatically executed without user confirmation when using 'gh copilot suggest' 1. [ ] The 'gh copilot explain' command modifies system files without showing the explanation 1. [ ] Suggested commands are directly executed without being copied to the clipboard first ### What is the primary purpose of the '/tests' slash command in GitHub Copilot? > https://docs.github.com/en/copilot/using-github-copilot/guides-on-using-github-copilot/writing-tests-with-github-copilot 1. [x] It generates a suite of unit tests for the currently open file, using context from existing test files if available 1. [ ] It runs all existing unit tests in the project without generating new ones 1. [ ] It only validates the syntax of existing test files without creating new tests 1. [ ] It permanently removes all existing test files to start fresh ### How is seat usage calculated for GitHub Copilot at the enterprise level during a billing cycle? > https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-access-to-copilot-in-your-enterprise/viewing-copilot-license-usage-in-your-enterprise 1. [x] Number of seats × (Days elapsed / Total days in billing cycle) 1. [ ] Total number of commits × Number of active developers 1. [ ] Number of code suggestions × Number of accepted completions 1. [ ] Total repository size × Number of organizations ### How does GitHub Copilot's matching public code feature work? > https://docs.github.com/en/copilot/using-github-copilot/finding-public-code-that-matches-github-copilot-suggestions 1. [x] It searches for matches by comparing code suggestions against an index of public GitHub repositories, which is refreshed every few months 1. [ ] It performs real-time searches across all GitHub repositories, including private ones 1. [ ] It only matches code from repositories that were created in the last 24 hours 1. [ ] It checks code against external code hosting platforms outside of GitHub ### What are the post-processing checks performed on GitHub Copilot's responses? > https://resources.github.com/learn/pathways/copilot/essentials/how-github-copilot-handles-data/ 1. [x] Toxic language, relevancy, code quality (including security vulnerabilities), unique identifiers, and optional public code matching 1. [ ] Only syntax validation and code formatting checks 1. [ ] Performance benchmarking and memory usage optimization 1. [ ] Just checking for compilation errors and runtime exceptions ### Which elements can GitHub Copilot use as context when generating suggestions? > https://docs.github.com/en/copilot/using-github-copilot/getting-started-with-github-copilot#using-context-in-github-copilot 1. [x] Content in the current file, neighboring files, repository URLs, file paths, and previous chat interactions 1. [ ] Only the current line of code being edited without any surrounding context 1. [ ] Exclusively external documentation from the internet 1. [ ] Just the project's README file and nothing else ### Which of the following is NOT a selectable mode in GitHub Copilot Chat? 1. [ ] Ask 1. [ ] Edit 1. [x] Translate 1. [ ] Chat > While GitHub Copilot can assist in translating code from one programming language to another, "Translate" is not a dedicated mode in the Chat window. ### When adding context in the chat, it is possible to add single files, but not entire folders. This statement is: > https://learn.microsoft.com/en-us/training/modules/get-started-github-copilot/10-examine-chat-view-features 1. [x] False 1. [ ] True ### Which of the following can be added as context for your prompt in GitHub Copilot Chat? (Select three.) > https://learn.microsoft.com/en-us/training/modules/get-started-github-copilot/10-examine-chat-view-features - [x] Symbols - [x] Terminal command output - [x] Test failures - [ ] External repositories - [ ] Environment variables (such as PATH) ### What are smart actions? > https://learn.microsoft.com/en-us/training/modules/get-started-github-copilot/11-examine-inline-chat-smart-actions-quick-chat 1. [x] Smart actions are common and predefined tasks such as explaining code, fixing code or generating tests and docs that can be performed by GitHub Copilot Chat without the need to draft a prompt for them. 1. [ ] Smart actions is an advanced GitHub Copilot modality used for debugging and fixing failing tests. 1. [ ] Smart actions are predefined tasks designed to assist with common coding tasks inside an organization, which can be set on repository and organization level. ### Which features are available in GitHub Copilot and GitHub Copilot Chat? > https://learn.microsoft.com/en-us/training/modules/develop-code-features-using-github-copilot-tools/2-examine-code-development-features-github-copilot 1. [x] Code line completions, inline chat, chat view, quick chat, smart actions 1. [ ] Code line completions, inline chat, chat view, smart actions, code research 1. [ ] Code line completions, inline chat, code container, quick chat ### Which of the sentences is correct? (Select two.) > https://learn.microsoft.com/en-us/training/modules/develop-code-features-using-github-copilot-tools/3-examine-github-copilot-best-practices - [x] Chat participants (such as `@workspace` or `@vscode`) can be used to provide extra context about the code base, a specific domain or technology. - [x] Slash commands (such as `/tests`, `/fix` or `/explain`) are a way to concisely tell what you would like to achieve with the prompt. - [ ] It is not possible to combine chat participants, commands and chat variables in a single prompt. - [ ] Chat participants can only be used to tag other members in the same organization. > Chat participants such as `@workspace` or `@vscode` are designed to provide context about code base, domain or technology, not for tagging other people. ### What is an alias used for when using GitHub Copilot? > https://learn.microsoft.com/en-us/training/modules/github-copilot-across-environments/4-git-hub-copilot-for-the-command-line 1. [x] Using an alias enables GitHub Copilot CLI to automatically execute commands in the command line. 1. [ ] Using an alias lets you indicate in Git commits that GitHub Copilot authored changes. 1. [ ] Using an alias allows GitHub to review and author pull requests on your behalf. ### Which statements are correct about GitHub Copilot CLI? (Select three.) > https://learn.microsoft.com/en-us/training/modules/github-copilot-across-environments/4-git-hub-copilot-for-the-command-line - [x] Prompts are not retained, whereas usage analytics are retained by default. - [x] It is possible to opt out of optional usage analytics. - [x] Responses generated by Copilot CLI can be reviewed after each suggestion. - [ ] Both prompts and usage analytics are retained by default. > Prompts are not retained by default. - [ ] It is not possible to opt out of optional usage analytics because they are anonymized. - [ ] GitHub Copilot CLI can only explain or suggest commands but not execute them on a users's behalf. ### You are developing an application in Kotlin. What do you have to keep in mind when using GitHub Copilot? > https://learn.microsoft.com/en-us/training/modules/github-copilot-across-environments/2-code-completion-with-git-hub-copilot 1. [x] Kotlin is not included in the languages where GitHub Copilot offers strong support. As a result, code suggestion might not be of the same quality as code suggestions in a better-supported language, such as Ruby, Java or C#. 1. [ ] Kotlin is not included in the languages where GitHub Copilot offers strong support. As a result, GitHub Copilot won't be able to explain or fix code. 1. [ ] Kotlin is not included in the languages where GitHub Copilot offers strong support. As a result, GitHub Copilot can still explain or fix code, but will not be able to provide code suggestions. 1. [ ] None is correct as Kotlin is included in the languages where GitHub Copilot offers strong support. ### Where can you find information about concerns related to security, intellectual property and privacy regarding the usage of GitHub Copilot? > https://learn.microsoft.com/en-us/training/modules/github-copilot-management-and-customizations/3-github-copilot-contractual-protections-disabling-matching-public-code 1. [x] GitHub Copilot Trust Center 1. [ ] GitHub Copilot Compliance Center 1. [ ] GitHub Copilot Compliance Hub 1. [ ] GitHub Copilot Legal Center 1. [ ] GitHub Copilot Legal and Trust Center ### Which of the GitHub Copilot subscription plans let you specify coding guidelines for code reviews? > https://learn.microsoft.com/en-us/training/modules/get-started-github-copilot/3-compare-github-copilot-plans 1. [x] Copilot Enterprise 1. [ ] Copilot Business and Copilot Enterprise 1. [ ] Copilot Pro+, Copilot Business and Copilot Enterprise 1. [ ] Copilot Pro, Copilot Pro+, Copilot Business and Copilot Enterprise ### Which statements are correct regarding the usage of @workspace and #codebase? (Select two.) > https://learn.microsoft.com/en-us/training/modules/generate-documentation-using-github-copilot-tools/3-examine-github-copilot-prompts-keywords - [x] Even though `@workspace` and `#codebase` both enable to ask questions about the entire codebase, the usage of `#codebase` is recommended. - [x] The `#codebase` keyword can be used in all chat modes. - [ ] The `@workspace` keyword can be used in all chat modes. - [ ] The `@workspace` keyword is in charge of the user prompt and can therefore use other tools.
Details

Found this practice test useful?

Leave a ⭐ on the repository and consider giving back to the community by:

  • contributing one or more mock exam questions (takes minutes)