DoAssignment study guide
B1.1 · Use basic programming terms correctly
Learn to use basic programming terms correctly through clear examples and targeted practice.
Ontario Grade 10 Computer Science
Introduction to Programming
Ontario Grade 10 Computer Studies — ICS2O B1.1
What you will learn
- Use basic programming terms accurately when describing a short program.
- Recognize input, processing, and output in a familiar scenario.
- Distinguish a variable, a value, an instruction, and a condition.
- Describe sequence, selection, and repetition in plain language.
1. Input, processing, and output
- Input is information provided to a program.
- Processing is work the program performs on information.
- Output is information the program provides.
2. Instructions, variables, and values
- A statement is an instruction in a program.
- A variable is a named place for a value.
- Sequence means instructions are carried out in order.
- An assignment gives a variable a value.
3. Decisions and repetition
- A condition can be true or false.
- Selection chooses an action based on a condition.
- Repetition carries out an instruction or group of instructions again.
4. Reading and describing a program
- Describe a program by naming its input, processing, and output.
- A comment is a note for people reading code.
- Debugging means finding and correcting a program problem.
Hand trace for the greeting example
| Stage | Information or action |
|---|---|
| Prompt shown | Name: |
| Input | Mina |
| Variable value | visitor holds Mina |
| Processing | Combine Hello, with Mina |
| Final result message | Hello, Mina |
Worked example
A greeting from a name
Python 3
visitor = input("Name: ")
message = "Hello, " + visitor
print(message)- Identify the inputThe visitor types Mina. That typed text is input. The instruction also displays the prompt `Name: ` while waiting for the response.
- Follow the instructionsThe program stores the entered text in the variable `visitor`. It then combines the greeting text with the value in `visitor` and displays the result.
- State the final result messageFor the assumed input Mina, the final result message is `Hello, Mina`. This is the result after the prompt and response, not the complete visible interaction. This is a hand trace from the code, not a claim that the code was run.
Worked example
Choosing a message with a condition
Python 3
reply = input("Reminder? ")
if reply == "yes":
print("Reminder on")
else:
print("Reminder off")- Name the conditionThe condition checks whether the value in `reply` is exactly `yes`. The condition is true for the lowercase response `yes` and false for `no`.
- Follow the selected actionSelection means choosing the action that matches the condition. For `yes`, the program displays `Reminder on`. For `no`, it displays `Reminder off`. The input instruction also displays the prompt `Reminder? ` before receiving a response.
- Check the exact matchThe condition asks for an exact match. The response `Yes` has a capital first letter, so it does not match lowercase `yes`; the program chooses the `else` action.
Worked example
Repeating a prompt a set number of times
Python 3
for attempt in range(1, 4):
response = input("Enter a response: ")
print("Finished")- Find the repeated instructionThe `for` instruction repeats the indented input instruction three times. The variable `attempt` takes the values 1, 2, and 3 in turn.
- Trace the prompts and inputsThe prompt `Enter a response: ` is displayed once during each repetition. For a hand trace, suppose the person enters `A`, then `B`, then `C`. These are three inputs, not final result messages.
- Identify the final result messageAfter the loop ends, the next instruction displays `Finished`. It is the final result message, not the complete visible interaction: the three prompts and responses appear before it. This expected result comes from reading the code, not from running it.
Common mistakes and how to avoid them
Lesson summary
- Input is information given to a program; processing is work performed; output is information the program provides.
- A statement is an instruction. A variable is a named place for a value.
- Sequence means instructions are carried out in order; selection chooses an action; repetition carries out instructions again.
- A condition can be true or false. Comments help people read code, and debugging means finding and correcting a problem.
- When a program displays a prompt, distinguish that prompt from the user's input and from the program's final result message.
Check your understanding
Question 1
- The variable that holds the entered name
- The displayed output
- The instruction to ask for a name
- The condition that chooses a message
Show answer and explanation
Question 2
- Selection
- Repetition
- Input
- Comment
Show answer and explanation
Question 3
- The input instruction being carried out again
- The value entered the first time
- The final message only
- A note written for the programmer
Show answer and explanation
Question 4
- The `else` action is chosen because the condition checks for exactly `yes`
- The `yes` action is chosen because the words look similar
- Both messages are displayed
- The condition repeats until the response changes
Show answer and explanation
Key terms
- Input
- Information provided to a program.
- Processing
- Work a program performs on information.
- Output
- Information a program provides.
- Statement
- An instruction in a program.
- Variable
- A named place in a program where a value can be kept.
- Value
- Information held or used by a program.
- Condition
- A test that can be judged true or false.
- Sequence
- Instructions carried out in order.
Continue through ICS2O
View the complete ICS2O Ontario Grade 10 Computer Science curriculum and lessons
Tutor support for B1.1 · Use basic programming terms correctly
Working on B1.1 · Use basic programming terms correctly in ICS2O? Bring the question and your own attempt. In a live session, you can trace a small input step by step, compare expected and actual output, and test an edge case. Ask about the first step that does not make sense, then try a similar question yourself.
Explore coding tutoring · Request an eligible free 30-minute introduction. Your request is matched by subject and language; a tutor must accept before a time is confirmed.
برای مبحث B1.1 · کاربرد درست اصطلاحهای پایه برنامهنویسی در درس ICS2O، سؤال و تلاش خود را همراه بیاورید. در جلسه میتوانید یک ورودی کوچک را گامبهگام دنبال کنید، خروجی مورد انتظار و واقعی را مقایسه کنید و یک حالت مرزی را بیازمایید. راهنمای معلم برنامهنویسی را ببینید یا جلسهٔ معارفهٔ رایگان ۳۰ دقیقهای درخواست کنید. زمان جلسه پس از پذیرش معلم قطعی میشود.
About this lesson and its review
Published by DoAssignment. This reviewed lesson follows Ontario Grade 10 Computer Science (ICS2O), expectation B1.1. It is a study resource, not an official curriculum publication.
Before publication, content is checked for structure, mathematical or chemical notation, calculations, course boundaries, and readability. Errors can still occur, so corrections are welcomed.