0% found this document useful (0 votes)
2 views4 pages

Programming

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Programming

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Activate Prior Knowledge

Start with a brainstorming activity.

Ask students:

1. What is a computer? and

2. What do you think programming is?

Assign each group a real-life task that involves problem-solving, such as:

Task 1: how will you solve a bad smell in your mouth.

1. How did you break down the problem?

2. What patterns did you notice?

Once they’ve discussed their tasks, introduce computational thinking:

For all what you said, we are going to talk about computational thinking

Computational thinking is how programmers think. It is breaking down into four element

1. Decomposition: Break down big tasks into smaller tasks

Example (School result system): as a computational thinker, what will you do?

Ama 21 32 54 11 =118 second

Alone 32 19 43 56 =150 first

Aka 65 09 21 19 =114 third

Input student details

Enter scores

Calculate total

Determine grade

Display result).

2. Pattern Recognition: Finding similarities in pattern without a decomposed problem

Example: when asked to cook Jollof and vegetables, jollof and fried chicken, jollof and eggs
How are you going to make it in 1hr

3. Abstraction: Focusing on important details ignoring irrelevant details.

Example When you are given a car to drive, what are the things you will do

You don’t need to know how the engine works

You focus on steering, brake, accelerator

4. Algorithms: is a step by step rules to be followed in problem solving, especially by a computer

Example (Algorithm to brush teeth):list them

Pick toothbrush

Apply toothpaste

Brush for 2 minutes

Rinse mouth.

Computer Programming

What is it?

Computer programming is the process of designing a computer program to perform a specific task. It
involves creating instructions (called code) that the computer can run or execute to achieve a result.

Before you can start programming you need to know the tasks involved

If you are a father or a mother, two of your sons are fighting over one woman, how will you solve it

1. Analysis: Understanding the problem before writing the code.

Analysis the problem within them by listening to both sides

2. Generating algorithms: Design the steps the computer must follow to solve the problem.

Find possible ways to help solve the problem

3. Profiling accuracy: Ensuring that the algorithm solves the problem correctly.

Make sure they both are happy and your solution will work
4. Resource consumption: Making sure the code runs efficiently and doesn’t use too much memory or
processing power.

Make sure you don't solve the problem with anger

5. Implementation: Writing the actual code in a programming language (like Python, Java, etc.).

Call them and implement your ways to solve it.

Let move on to, Why is programming important?

1. Learning programming is helpful for problem-solving in the real world. It helps students develop
logical thinking, creativity, and analytical skills.

2. Programming teaches you how to break down complex problems into smaller, manageable pieces and
solve them systematically. This process, called decomposition, is applicable to many real-world
challenges beyond computing.

Let move on to Programming Terminologies

1. Algorithm: An algorithm is a set of step-by-step instructions to solve a problem.

an algorithm outlines the steps needed to solve a problem in programming.

2. API (Application Programming Interface)

Definition: An API is a set of rules and protocols for how different software applications communicate
with each other.

Example: it's like a menu in a restaurant. The menu lists dishes that the chef can prepare. The API is like
the menu because it tells the programmer what the program can do, but doesn't tell them how to do it.
You order from the menu (use the API) to get the desired result

3. Argument: An argument is a value passed to a function or command that helps it perform a specific
task.

Imagine you have a function or a code that calculates the square of a number. The function needs to
know which number to square. The argument is that number.

4. Array: What is it? An array is a collection of elements (values) of the same type, stored in a specific
order. Each element can be accessed by its position (index) in the array.

Example, students_ages = (14, 21,16,19)


5. ASCII: What is it? ASCII (American Standard Code for Information Interchange) is a coding system used
to represent text in computers. It assigns a unique number (called the ASCII code) to every character,
letter, number, or symbol.

Real-World Example: ASCII is like a secret codebook where every letter, number, and symbol has a
specific code. For example, the letter "A" might be represented as 65, and the number "1" as 49.

ASCII Example:

The character '$' might have the ASCII code 36.

The character 'a' might have the ASCII code 97.

You might also like