CDW - Creating a Computer Program {LESSON}

Creating a Computer Program

Computer programming can be defined as a process of writing a set of instructions called a program. The program instructs a computer to perform a specific task. The set of instructions is written in a programming language, such as block-based or text, that the computer can decode and execute.

Before you begin to create a computer program, you must establish an understanding of programs and what they do.

What exactly is a computer program? A computer program is a sequence of instructions written in a programming language to perform a specific task.

Today you can see computer programs being used to do a number of tasks. Think about when you go to the doctor and you have to get  ultrasounds, x-rays, or other medical examinations. What about developing the graphics and special effects for your favorite animations or movies? Or even just simply using your mobile device to communicate. All of which involve a computer program to complete a specific task.

In this lesson, you will learn some common programming concepts and then apply your knowledge to create a program.

Computer programmers use concepts to create logical, ordered instructions for computers to follow. A program has different parts that perform specific functions to create a certain outcome. Let’s start by developing an understanding of some core programming concepts that could be very helpful when designing a program.

Programming Concepts Terms to Know

Click through the Programming Concepts Terms to Know learning object to learn more.

All of those concepts work as a system to ensure that you create an efficient program.

Let’s Program!

Computer programs can prove to be extremely powerful and effective tools for solving a wide range of problems. But in order to fully embrace that power, you will need to be proficient in instructing those programs to perform highly precise operations in well-structured and logical sequences. Let’s experiment with a number of basic programming concepts and constructs, such as variables, user input, and selection statements. In the process, you will learn how to create executable code and explore techniques for debugging your code to verify accuracy.

Because programs so need well-defined beginnings and ends, a number of discrete events, and some indication of the ordering of these events, many programmers use flowcharts to plan their programs. Flowcharts are visual representations of structured processes — encompassing computer programs, stories and scripts, business models, and more. You may find that flowcharting is helpful to you in planning out the sequence of events in your programs. Kind of similar to how components of the computer function: Inputs →Storage(What needs to be remembered)→Processing (Instructed program to do certain tasks)→Output (Focus: observable behaviors generated by the computer such as animation, sound, and text.)

Let’s think about Scratch, a block-based, visual programming language mentioned in a previous module.

How to Make a Story Video

Take a look at a program that was created in Scratch in the How to Make a Story in Scratch video below.

"How to Make a Story in Scratch." YouTube, uploaded by Scratch Team, 28 October 2021, https://www.youtube.com/watch?v=uv8mbL-MC58 Links to an external site.. Used according to Terms of Use.

Now you can take a few steps to get started on creating your first program in Scratch. Download the Getting Started Scratch PDF to get started! Links to an external site.

At this point, you should have a basic understanding of how to create a program in Scratch.

[CC BY 4.0] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION