0% found this document useful (0 votes)
8 views20 pages

Computer Science

Uploaded by

frank adams
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)
8 views20 pages

Computer Science

Uploaded by

frank adams
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

edu.gcfglobal.

org

Computer Science: Algorithms


14-17 minutes

Lesson 1: Algorithms

Algorithms

You may have heard the term algorithm recently, whether it was online or perhaps in some
conversation about technology. It's a word that gets thrown around a lot, but what does it mean
exactly?

Watch the video below to learn more about algorithms.

An algorithm is simply a set of steps used to complete a specific task. They're the building
blocks for programming, and they allow things like computers, smartphones, and websites to
function and make decisions.

In addition to being used by technology, a lot of things we do on a daily basis are similar to
algorithms. Let's say you want to make some spaghetti. In order to do this successfully, there's a
certain set of steps you need to follow in a particular order.
First, you'll need to boil a pot of water. Once it's boiling, you then add the spaghetti and cook
it for a set amount of time, stirring occasionally. Once it's finished, you drain the water, then it's
ready to be served with a sauce of your choice.

This entire process is actually an algorithm. Because you followed these steps in a particular
order, you reached your desired outcome: a delicious pasta dish. But if you were to make a
mistake like overcooking or undercooking your noodles, it probably wouldn't be as good.

Programs work in a similar way. Their code is made up of algorithms telling them what to do.
Let's say we want to use a navigation app to get directions.

When we type a destination, the app uses an algorithm to look at the various available routes.
Next, it uses a different algorithm to check the current traffic, then a third one takes that
information and calculates the best available route.
All of these algorithms are built right in to the app's code. If there were any kind of error in the
code, the app wouldn't be able to follow these algorithms correctly, meaning you wouldn't
receive your directions.

Both of these examples show how humans and computers can use algorithms to perform
everyday tasks. The difference is that computers can use algorithms and calculate things better,
faster, and more efficiently than we can.
Technology will only continue to evolve and get even better at what it does. As long as coding
and programming continue to be used, algorithms will be at the heart of these technologies,
guiding what they do and how they do it.

/en/computer-science/hardware-and-software/content/

Lesson 2: Hardware and Software

/en/computer-science/algorithms/content/

Hardware and software

Hardware and software are two terms you've probably heard of at some point or another. The
odds are high that you use both on a daily basis, whether it's with your smartphone or personal
computer. Let's take a deeper look at what these two things are and why they're important.

Watch the video below to learn more about hardware and software.

Hardware is any element of a computer that's physical. This includes things like monitors,
keyboards, and also the insides of devices, like microchips and hard drives.
Software is anything that tells hardware what to do and how to do it, including computer
programs and apps on your phone. Video games, photo editors, and web browsers are just a few
examples.
Hardware and software are different from each other, but they also need one another in order
to function. Let's look at an example of this using a smartphone. In this case, the hardware
would be the physical phone itself, and the software would be its operating system and apps.

If we were to take away the software, we would just have a dead phone in our hands. It wouldn't
be able to make calls, text, or go online because it's not receiving any instructions.

On the other hand, let's say we have no hardware, meaning there's no actual phone. If all we
have are the programs, we just have a bunch of instructions but nothing to give these
instructions to.
The big picture here is that hardware needs software to tell it what to do, but software also needs
hardware in order to act out its directions. When you combine the two, you can do all sorts of
things, whether you're using a smartphone, computer, or any other type of device.

Technology will continue to evolve. We may not be sure how it will look in 100 years, but
hardware and software will be there serving as its foundation.
/en/computer-science/binary/content/

Lesson 3: Binary

/en/computer-science/hardware-and-software/content/

Binary

Throughout history, almost every civilization has used a decimal number system with 10 digits:
zero through nine. All of the numbers we can possibly think of use some combination of these 10
digits.

Computers, however, operate differently. Instead, they use a number system that has just two
digits: one and zero. This system is called binary, and your computer uses it all the time.

Watch the video below to learn more about how computers use binary.

Computers need information in order to do what they do. This digital information, or data, is
made up of something called bits. Bit is short for a binary digit, meaning each bit is really just a
single number: either a one or a zero.

These bits can be combined to create larger units like bytes, megabytes, and so on that we use to
measure our files. The larger a file is, the more bits it has. So something like a high-resolution
video is actually made up of millions and millions of ones and zeroes.
But how exactly do these ones and zeroes come together and allow a computer to function? Let's
think of binary like a light switch. Imagine that a one represents the light switch being on, and a
zero represents it being off. With binary, the light is either on or off, with no other possible
states.

These bits are strung together as different combinations of ones and zeroes, and they form a kind
of code. Your computer then rapidly processes this code and translates it into data, telling it what
to do.
You might be wondering why computers use binary instead of the decimal system we use for
counting things in our daily lives. As mentioned above, binary has two states: off and on. If
computers were to use the decimal system, there would be 10 states instead and they would have
to work a lot harder to process them all. Binary is easier for computers to process, and it also
takes up less space.
Just like atoms make up everything around us in the real world, everything in the digital world
can be broken down into binary. And even though we can't see them, it's all a bunch of ones and
zeroes.

/en/computer-science/programming-languages/content/

Lesson 4: Programming Languages

/en/computer-science/binary/content/

Programming languages

Everything we do on computers and smartphones has some sort of code behind it telling it what
to do. But have you ever thought about how this code gets written?

There are thousands of languages in the world around us, and in the the digital world, things
aren't so different. There are also tons of different programming languages making up the code
that powers much of our technology.

Watch the video below to learn more about programming languages.

A programming language is made up of specific terms and directions that are used to create
some type of output, such as websites, apps, and other software.

Languages like Javascript, Python, and Java are often used by websites for a variety of
purposes. C++ is used just about everywhere to make things like desktop apps, games, and more.
There's also HTML and CSS. While these aren't technically programming languages, they're
used to create the structure and appearance of almost every website.

These are just a few of the most popular languages, but there are also many, many more. The
reason for this is that all of these languages are unique and operate differently from one
another.
To further explain this, let's take a look at vehicles. There are all different types of vehicles in the
world, and most of them can get you from point A to point B. Which one you choose, however,
depends on several factors.

Some of them might be faster than others, and certain vehicles might take more skill or training
to operate. In some instances, one vehicle might work better than another, like if you needed to
move some bulky objects. But in a lot of cases, most modes of transportation can get the job
done, and it just comes down to what you personally prefer.
All of these qualities about vehicles also apply to programming languages. For example, a web
developer might choose to use JavaScript because it works well with HTML, while a video
game designer might choose C++ because it can handle more complex graphics.

Without programming languages, most of the technology we use on a daily basis would be
useless. When it comes down to it, they're simply the backbone of all of our software.

/en/computer-science/sequences-selections-and-loops/content/

Lesson 5: Sequences, Selections, and Loops

/en/computer-science/programming-languages/content/

Sequences, selections, and loops

Behind all of the software we use on a daily basis, there's a code being run with all sorts of terms
and symbols. Surprisingly, it can often be broken down into three simple programming structures
called sequences, selections, and loops. These come together to form the most basic instructions
and algorithms for all types of software.

Watch the video below to learn more about sequences, selections, and loops.

A sequence is a series of actions that is completed in a specific order. Action 1 is performed,


then Action 2, then Action 3, etc., until all of the actions in the sequence have been carried out.
A sequence we do every day is a morning routine. You might wake up, drink some water, take
a shower, eat breakfast, and so on. Everyone's routine is different, but they're all made up of a
sequence of various actions.

Selections are a bit different. Instead of following a specific order of events, they ask a question
in order to figure out which path to take next.
Let's say you go to brush your teeth, and you find that you're out of toothpaste. You'd then ask,
"Do I have any more toothpaste?" If the answer is no, then you would add it to your shopping
list. But if the answer is yes, you would just use the toothpaste. This is really all a selection is
doing: answering a question based on what it finds.

The third programming structure is a loop. Like selections, loops ask questions. However, the
difference is that they ask the same question over and over and over again, until a certain task
is complete.
For example, take the act of hammering a nail. Even though you may not realize it, you're
constantly asking yourself, "Is the nail all the way in?" When the answer is no, you hammer the
nail again. You continue to repeat this question until the answer is yes, and then you stop. Loops
allow programmers to efficiently code repetitive tasks instead of having to write the same actions
over and over again.

These three programming structures may seem pretty simple on their own, but when combined
they can create some pretty complex software.
/en/computer-science/should-i-learn-to-code/content/

Lesson 6: Should I Learn to Code?

/en/computer-science/sequences-selections-and-loops/content/

Should I learn to code?

In recent years, there's been a lot of hype around coding: that it's an invaluable skill everyone
should learn or that it's a field where there's a lot of money to be made. And while there are a
lot of great reasons to learn to code, it might not be the best career choice for everyone. In order
to determine if coding is a good fit for you, you'll want to consider a few things.

Watch the video below to learn more about whether a career coding is a good fit for you.

One thing to think about is the job market. There are a lot of jobs and freelance opportunities
out there for programmers and many of them pay well, but there are even more programmers
seeking jobs. This means that simply knowing how to code isn't a surefire way to land a job.
Employers are looking for the highest-quality programmers out there.

Like any skill, coding takes dedication and patience to develop. The more time you put into it,
the better you'll become. Learning your first coding language might prove to be a long and
difficult process. But the good news is that once you've learned one, others become easier to
grasp.
As technology continues to evolve some new jobs will be created, but some of today's jobs will
also become obsolete. Some argue that it might be a better investment to study growing fields
like artificial intelligence and machine learning.
On the other hand, learning to code is a great way to gain an understanding of software from the
bottom up, and it can serve as a jumping-off point if you want to move into these fields in the
future.

So should you learn to code? There are a lot of opinions out there, but ultimately it's up to you.
If it seems like something you'd really enjoy and you're willing to put in the effort, go for it!

But if it's something you're on the fence about, you might want to keep looking. There's a lot of
other options out there, and you're bound to find something that's a better fit for you.

You might also like