Matching an IDE function to a need

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Matching an IDE function to a need

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A student wants to run their program inside the IDE and see its output without leaving the program. Which IDE function helps?
A Run-time environment
B Prettyprint
2. A programmer's code has a missing bracket. The IDE underlines the line and shows a message. Which function is doing this?
A Error diagnostics
B Auto-completion
3. A student types 'pri' and the IDE offers to finish it as 'print'. Which function is this?
A Auto-correction
B Auto-completion
4. A student types 'pritn' and the IDE changes it to 'print'. Which function is this?
A Auto-correction
B Auto-completion
5. Code is messy, with inconsistent indentation and colours that are all the same. The programmer wants it easier to read. Which function helps?
A Error diagnostics
B Prettyprint

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Error diagnostics AAuto-completion
2Prettyprint BRun-time environment
3A student starts typing a long variable name and wants the IDE to offer the rest of the name so they type less CColours keywords and sets out the code with indents so it is easier to read
4A programmer wants to test their program inside the IDE without leaving it, using the translator to run it DError diagnostics finds mistakes. Typing and editing code is done in the code editor.
5Needing a tool to fix a typing slip like 'pritn' automatically -> use Prettyprint EPrettyprint only changes the layout and colour of code. Fixing a typo as you type is auto-correction.
6Needing a place to type and edit the source code -> use Error diagnostics FPoints out the line and type of a mistake so the programmer can find and fix it

Definitions

IDE function

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Need: type code -> Function: ___________
2.
Need: run program -> ____________________
3.
Need: find errors -> _________________
4.
Typing pri suggests print -> _______________
5.
Need: tidy layout -> ___________

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A need = "see where the bug is"
B tool = "prettyprint"
C print("Use", tool)
Question 2
A need = "tidy messy layout"
B tool = "prettyprint"
C print("Use" tool)
Question 3
A tools = {
B "type": "code editor",
C "names": "auto-completion",
D "typos": "prettyprint",
E }
Question 4
A need = "tidy my code layout"
B tool = "run-time environment"
C print("Use", tool)
Question 5
A need = "save typing"
B tool = "auto-completion"
C print("Use " - tool)

Answer Key

Matching an IDE function to a need
Section A: Quick Questions
Q1
A — Run-time environment
Q2
A — Error diagnostics
Q3
B — Auto-completion
Q4
A — Auto-correction
Q5
B — Prettyprint
Section B: Match the Pairs
Q1
Error diagnostics → Points out the line and type of a mistake so the programmer can find and fix it
Q2
Prettyprint → Colours keywords and sets out the code with indents so it is easier to read
Q3
A student starts typing a long variable name and wants the IDE to offer the rest of the name so they type less → Auto-completion
Q4
A programmer wants to test their program inside the IDE without leaving it, using the translator to run it → Run-time environment
Q5
Needing a tool to fix a typing slip like 'pritn' automatically -> use Prettyprint → Prettyprint only changes the layout and colour of code. Fixing a typo as you type is auto-correction.
Q6
Needing a place to type and edit the source code -> use Error diagnostics → Error diagnostics finds mistakes. Typing and editing code is done in the code editor.
Section C: Definitions
Q1
IDE function — A built-in IDE tool that solves one programmer problem, so you match a need (typing, running, finding errors, saving typing, fixing, tidying) to the right function.
Section D: Fill in the Blanks
Q1
Need: type code -> Function: code editor
Q2
Need: run program -> run-time environment
Q3
Need: find errors -> error diagnostics
Q4
Typing pri suggests print -> auto-completion
Q5
Need: tidy layout -> prettyprint
Section E: Spot the Error
Q1
B — Finding where a mistake is needs error diagnostics, which point to errors in the code. Prettyprint only tidies the layout. Line 2 should be tool = "error diagnostics".
Q2
C — The two values inside print() must be separated by a comma. It should be print("Use", tool).
Q3
D — Fixing mistyped words automatically is the job of auto-correction. Prettyprint only changes layout and indentation. Line 4 should map "typos" to "auto-correction".
Q4
A — The need does not match the tool. Running a program is the job of the run-time environment, so line 1 should describe running the program, such as need = "run my program".
Q5
C — Strings are joined with + (concatenation). The - operator cannot be used on strings. It should be print("Use " + tool).