How to Use

To get started with Pair Programmer, you will need to specify programming language you are using or want to use. By default, the field is set to Python.

Once you submit your programming language, you will receive a message similar to the one below (although the exact wording may differ) that details what Pair Programmer has to offer and provides some useful commands:

pair programmer example

If everything looks correct, you can then write your programming question into the prompt area.

/change

The /change command allows you to modify your preferences when interacting with Pair Programmer. Currently, it supports two options:

  • Programming language – Switch programming language. For example, enter /change language=Java to switch to Java.

  • Interaction language – Change the communication language. For example, enter /change language=Spanish to switch to Spanish.

/implement

The /implement command is used when you want to create a new program. It follows a five-step procedure to ensure a thorough approach:

For example, you could input/implement task=TaskDescription. Please replace TaskDescription with a description of the task you want to be implemented.

Example

Let's say you want to implement a program that calculates the sum of all elements in a list.

/modify

The /modify command is used when you want changes or adjustments made to an existing program. Input /modify code=ProgramCode modifications=ProgramModification. Please replace ProgramCode with the program you want to modify, and ProgramModification with a description of what you want to change.

Example

For example, imagine you have a Python function that calculates the area of a rectangle, and you want to modify it to calculate the area of a circle instead.

/test

The /test command is used when you want me to create test cases for a given program. Input /test code=ProgramCode description=ProgramDescription. Please replace ProgramCode with the program you want to test, and ProgramDescription with a description of what the program does.

Example

Let's say you have a Python function that calculates the factorial of a number and you want to create test cases for it

Last updated