Introduction to Programming Languages: Meaning and Types of Text-Based Programming Languages Primary 4 (Basic 4) First Term Week 9 Information Technology – Computer Studies
INTRODUCTION TO PROGRAMMING LANGUAGES: MEANING AND TYPES OF TEXT-BASED PROGRAMMING LANGUAGES
INFORMATION TECHNOLOGY (COMPUTER STUDIES)
PRIMARY 5 – FIRST TERM – WEEK 9
THEME – BASIC COMPUTER OPERATIONS
TOPIC – TEXT-BASED PROGRAMMING LANGUAGES
LEARNING AREA
1. Introduction
2. Meaning and Types of Text-Based Programming Languages
3. Uses of Text-Based Programming Languages
4. Practical Activities
5. Weekly Assessment: Test Questions and Answers/Assignment
6. Summary
LEARNING OBJECTIVES
By the end of the lesson, pupils should be able to:
1. Explain the meaning of a text-based programming language.
2. Identify different types of text-based programming languages.
3. State the uses of text-based programming languages.
4. Differentiate between visual-based and text-based programming languages.
5. Appreciate the importance of text-based programming in creating computer programs.
ENTRY BEHAVIOUR
Pupils have previously learned that visual-based programming languages use colourful blocks and drag-and-drop commands to create computer programs.
This lesson builds on that knowledge by introducing text-based programming languages, which use typed words, symbols, and commands to write computer programs. Pupils will learn their meaning, examples, uses, and how they differ from visual-based programming languages.
INSTRUCTIONAL MATERIALS
The teacher will teach the lesson with the aid of:
1. Desktop or laptop computer
2. Projector (if available)
3. Charts showing examples of programming languages
4. Printed sample computer codes
5. Whiteboard and marker
METHOD OF TEACHING
Choose a suitable and appropriate methods for the lessons.
Note – Irrespective of choosing methods of teaching, always introduce an activities that will arouse pupil’s interest or lead them to the lessons.
REFERENCE MATERIALS
1. Scheme of Work
2. 9 – Years Basic Education Curriculum
3. Course Book
4. All Relevant Material
5. Online Information
CONTENT OF THE LESSON
INTRODUCTION
As programmers become more experienced, they often use programming languages that require typing commands instead of dragging colourful blocks. These are called text-based programming languages.
In this lesson, pupils will learn the meaning of text-based programming languages, examples of common text-based programming languages, their uses, and how they are different from visual-based programming languages.
MEANING OF A TEXT-BASED PROGRAMMING LANGUAGE
A text-based programming language is a programming language in which programmers write instructions by typing words, symbols, and commands using a keyboard.
Unlike visual-based programming languages, text-based programming languages do not use drag-and-drop blocks.
TYPES OF TEXT-BASED PROGRAMMING LANGUAGES
Some common text-based programming languages are:
1. Python – Python is an easy-to-learn programming language used to create games, websites, software, and artificial intelligence (AI) applications.
2. Java – Java is a programming language used to develop computer programs, mobile applications, and websites.
3. C++ – C++ is a programming language used to create games, operating systems, and computer software.
4. Javascript – JavaScript is a programming language used to make websites interactive by adding animations, buttons, menus, and other features.
5. BASIC (Beginner’s All-purpose Symbolic Instruction Code) – BASIC is one of the early programming languages designed to help beginners learn computer programming.
USES OF TEXT-BASED PROGRAMMING LANGUAGES
Text-based programming languages are used to:
1. Develop computer software.
2. Create websites.
3. Develop mobile applications.
4. Create computer games.
5. Develop operating systems.
6. Build artificial intelligence (AI) applications.
7. Control robots and smart devices.
8. Solve complex computing problems.
Difference Between Visual-Based and Text-Based Programming Languages
1. Visual-Based Programming Languages
- Use colourful blocks and pictures.
- Commands are dragged and dropped.
- Easy for beginners and children.
- Example: Scratch.
2. Text-Based Programming Languages
- Use typed words, symbols, and commands.
- Require writing computer code.
- Suitable for creating advanced software.
- Example: Python.
IMPORTANCE OF TEXT-BASED PROGRAMMING LANGUAGES
Text-based programming languages help programmers to:
1. Create professional software.
2. Develop websites and mobile applications.
3. Solve complex problems.
4. Improve logical thinking.
5. Build advanced computer systems.
6. Prepare for careers in technology and software development.
TEXT-BASED PROGRAMMING LANGUAGES: PRACTICAL ACTIVITIES
The teacher demonstrates the following practical activities using a computer:
1. Turn on the computer.
2. Open a simple text editor or a beginner-friendly programming application (such as Python IDLE, Notepad, or another coding environment if available).
3. Explain that text-based programming languages require users to type instructions using the keyboard.
4. Display a simple program, for example: print(“Hello, World!”)
5. Explain that the computer follows the typed instructions to produce an output.
6. Run the simple program (if a programming application is available) and show the result on the screen.
7. Display the names of common text-based programming languages:
- Python
- Java
- C++
- JavaScript
- BASIC
8. Compare a Scratch program with a simple text-based program to show the difference between drag-and-drop blocks and typed commands.
9. Allow pupils to identify letters, symbols, and punctuation marks used in simple computer code.
10. Explain that programmers must type commands correctly because computers follow instructions exactly as written.
PUPIL’S ACTIVITIES
1. Observe the teacher typing a simple program.
2. Identify typed commands, letters, and symbols.
3. Read the names of common text-based programming languages.
4. Compare a visual-based program with a text-based program.
5. Observe the output produced after running the program.
6. Discuss the differences between visual-based and text-based programming languages.
WEEKLY ASSESSMENT: TEST QUESTIONS AND ANSWERS/ASSIGNMENT
A. Multiple Choice Questions (5 Marks)
1. A text-based programming language uses ______.
A. colourful blocks
B. pictures only
C. sounds
D. typed words and commands
2. Which of the following is a text-based programming language?
A. Scratch
B. Blockly
C. Python
D. Snap!
3. Which programming language is commonly used to make websites interactive?
A. JavaScript
B. Scratch
C. Alice
D. Blockly
4. BASIC was designed mainly for ______.
A. robots
B. beginners
C. teachers only
D. games only
5. Which device is mainly used to type commands in a text-based programming language?
A. Mouse
B. Monitor
C. Printer
D. Keyboard
B. Fill in the Blanks (5 Marks)
6. A ______ programming language uses typed commands.
7. ______ is one of the easiest text-based programming languages to learn.
8. Java is used to develop computer programs and ______ applications.
9. ______ is used to create games and operating systems.
10. Text-based programming languages require programmers to type ______.
C. True or False (5 Marks)
11. Python is a text-based programming language. ______
12. Scratch is a text-based programming language. ______
13. JavaScript can be used to make websites interactive. ______
14. Text-based programming languages use drag-and-drop blocks. ______
15. Text-based programming languages help programmers create software and applications. ______
D. Match Column A with Column B (5 Marks)
Column A – Column B
16. Python – A. Makes websites interactive
17. Java – B. Easy-to-learn programming language
18. C++ – C. Develops mobile applications
19. Javascript – D. Creates games and operating systems
20. BASIC – E. Designed for beginners
ANSWER KEYS
1. D – Typed words and commands
2. C – Python
3. A – JavaScript
4. B – Beginners
5. D – Keyboard
6. text-based
7. Python
8. mobile
9. C++
10. commands
11. True
12. False
13. True
14. False
15. True
16. B – Easy-to-learn programming language
17. C – Develops mobile applications
18. D – Creates games and operating systems
19. A – Makes websites interactive
20. E – Designed for beginners
SUMMARY
In this lesson, pupils learned that a text-based programming language is a programming language in which instructions are written by typing words, symbols, and commands using a keyboard.
They identified common text-based programming languages, including:
- Python
- Java
- C++
- JavaScript
- BASIC
Pupils also learned the uses of text-based programming languages, such as developing computer software, creating websites, building mobile applications, designing games, developing operating systems, and creating artificial intelligence (AI) applications.
Finally, pupils learned the difference between visual-based and text-based programming languages. They understood that visual-based programming languages use colourful drag-and-drop blocks, while text-based programming languages require users to type commands. They also learned that text-based programming languages are widely used for creating advanced computer programs and applications.
PRESENTATION
To deliver the lesson, the teacher adopts the following steps:
Step 1: Introduction – The teacher reminds pupils that they previously learned about visual-based programming languages, which use colourful blocks to create programs. The teacher explains that programmers can also create programs by typing commands. This method is called text-based programming.
Pupils’ Activities: Pupils recall what they learned about visual-based programming languages.
Step 2: Meaning of a Text-Based Programming Language – The teacher explains that a text-based programming language is a programming language in which programmers type words, symbols, and commands to tell a computer what to do.
Pupils’ Activities: Pupils explain the meaning of a text-based programming language in their own words.
Step 3: Types of Text-Based Programming Languages – The teacher introduces and explains the following text-based programming languages:
- Python
- Java
- C++
- JavaScript
- BASIC
The teacher displays their names and simple examples of computer code.
Pupils’ Activities: Pupils identify the different text-based programming languages.
Step 4: Uses of Text-Based Programming Languages – The teacher explains that text-based programming languages are used to:
- Develop computer software.
- Create websites.
- Build mobile applications.
- Develop games.
- Create operating systems.
- Develop artificial intelligence (AI) applications.
Pupils’ Activities: Pupils mention different uses of text-based programming languages.
Step 5: Difference Between Visual-Based and Text-Based Programming Languages – The teacher explains that:
- Visual-based programming languages use colourful drag-and-drop blocks.
- Text-based programming languages use typed words, symbols, and commands.
The teacher compares a simple Scratch program with a simple Python program.
Pupils’ Activities: Pupils identify the differences between the two types of programming languages.
Step 6: Group Activity – The teacher divides the class into four groups and assigns the following activities:
- Group 1: Explain the meaning of a text-based programming language.
- Group 2: Identify and describe five text-based programming languages.
- Group 3: List and explain five uses of text-based programming languages.
- Group 4: Compare visual-based and text-based programming languages and present at least three differences.
Each group presents its work before the class.
Pupils’ Activities: Pupils discuss, complete the assigned activities, and present their findings.
Step 7: Lesson Summary – The teacher reviews the meaning, types, uses, and importance of text-based programming languages and compares them with visual-based programming languages.
Pupils’ Activities: Pupils answer oral questions and summarise the lesson.
Step 8: Evaluation – The teacher asks oral and written questions to assess pupils’ understanding of text-based programming languages.
Pupils’ Activities: Pupils answer the evaluation questions and participate actively in the lesson.
CONCLUSION
To conclude the lesson for the week, the teacher revises the entire lesson and links it to the following week’s lesson.
NEXT LESSON
LESSON EVALUATION
Teacher asks pupils,
1. What is a text-based programming language?
2. Mention five examples of text-based programming languages.
3. State five uses of text-based programming languages.
4. Mention five importance of text-based programming languages.
5. Differentiate between:
(a) Visual-based programming language and Text-based programming language.
6. Which programming language is commonly used for:
(a) Building websites?
(b) Developing mobile applications?
(c) Creating games and operating systems?
7. Why do programmers use text-based programming languages?
8. Which device is mainly used to write commands in a text-based programming language?
9. State three advantages of learning text-based programming languages.
10. Demonstrate your understanding by opening a text editor or coding application (if available), typing a simple programming command provided by the teacher, and identifying the typed commands, symbols, and output.