Page 94 - 2502_Pakistan-kifayat_C-6
P. 94
1. You would first tell the computer to store the numbers in a variable.
2. Then, you would give the computer the instruction to add the numbers.
3. Finally, you would ask the computer to display the result.
In the real world, programming is like following a recipe. Just like a recipe gives step-by-step instructions
for cooking, programming gives step-by-step instructions for the computer to follow.
An example in programming (without specific programming language syntax):
1. Store the first number (for example, 5).
2. Store the second number (for example, 7).
3. Add the two numbers together.
4. Display the result (in this case, 12).
IMPORTANCE OF PROGRAMMING IN TODAY’S WORLD
In today’s fast-paced world, technology is all around us. From the apps on our phones to the websites
we visit, programming plays a key role in making these things work. Programming is the language that
tells computers, phones, and other devices what to do. It’s like giving instructions to a robot, allowing
it to perform tasks, solve problems, and even create new things. As technology continues to grow,
learning programming has become more important than ever. It helps us build games, apps, websites,
and even automate tasks, making our lives easier and more efficient. Understanding programming not
only opens up a world of creativity but also equips us with the skills to shape the future.
Why is Programming Important?
Some reasons why programming is important are as follows:
Helps us create things: Imagine you want to build a game or design a cool website. You can do
this with programming! It’s like building something new, but instead of bricks, you use code and
commands to tell the computer what to do.
Example: Let's say you want to create a fun game on the computer. You can use programming to
tell the computer how the game should work—where the characters should move, when to show
points, and how the game should end.
Problem-solving skills: It teaches you how to solve problems. It helps you think carefully about
what you want to happen, step-by-step. When you face a challenge, programming helps you break
it down into smaller parts and find a way to fix it.
Example: If you’re playing a game and something isn't working, programming helps you figure out
what went wrong and how to make it better. It’s like being a detective.
Automation makes things easier: Have you ever wished you didn’t have to do something boring
over and over again, like sorting files on your computer? With programming, you can create programs
that do these tasks automatically. This makes life easier and saves a lot of time.
Example: You could create a program to sort all your photos in a folder into different groups like
‘Family,’ ‘Friends,’ and ‘Holiday’ without having to do it yourself.
92 Premium Edition-VI

