0% found this document useful (0 votes)
45 views

Intro To Programming

Programming involves writing sequences of instructions and decisions to create software programs. There are three types of programming languages: machine language using numbers, assembly language using English-like abbreviations and numbers, and high-level languages using everyday English and math. High-level languages must be compiled into machine language for computers to execute the instructions. Algorithms can be represented using flowcharts or pseudo-code to specify the steps to solve a problem. There are two types of errors in programming: syntax errors involving incorrect grammar and semantics errors where the meaning is distorted. Debugging is the process of finding and fixing bugs in a program. BYOB is a visual programming language that uses drag-and-drop blocks of pre-written code instead of typing

Uploaded by

api-326363829
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Intro To Programming

Programming involves writing sequences of instructions and decisions to create software programs. There are three types of programming languages: machine language using numbers, assembly language using English-like abbreviations and numbers, and high-level languages using everyday English and math. High-level languages must be compiled into machine language for computers to execute the instructions. Algorithms can be represented using flowcharts or pseudo-code to specify the steps to solve a problem. There are two types of errors in programming: syntax errors involving incorrect grammar and semantics errors where the meaning is distorted. Debugging is the process of finding and fixing bugs in a program. BYOB is a visual programming language that uses drag-and-drop blocks of pre-written code instead of typing

Uploaded by

api-326363829
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Programming... What is it?

First of all, we need to understand what a computer program is.


A computer program is simply sequences of instructions and decisions. It is
these sequences and instructions that make up your favorite games, iTunes, and
even the web browser you are using right now!

So, a programming language is used to program or to write code for all these
amazing software that you are using! There are three types of languages:

1) Machine languages
Instructions are encoded in numbers

2) Assembly languages: Easier to understand Machine Languages


English-like abbreviations combined with numbers

3) High-level languages: What we humans understand


High-level programming languages make use of mainly everyday English and
mathematical notations. As a result, computers, which only understand binary
code(0s and 1s), cannot understand them. So, in order to make computers
understand our code, high-level language programs need to be compiled into
machine language so that computers can carry out the instructions.

The languages we use currently are mostly high- level languages so we'll mostly
be dealing with high-level languages. BYOB is also a high-level language known
as a visual programming language, since it makes use of graphical elements to
code!

Designing and Representing Algorithms


An Algorithm is a specification of steps that are required to solve a particular
problem. For instance, when given a random set of numbers and you are asked
to sort the numbers from greatest to smallest, a sorting algorithm can be used.
The algorithm can be represented using a flowchart or a pseudo-code.
A flowchart is a graphical representation of an algorithm
A pseudo-code is an intermediate between human language and a
programming language.

Errors...errors....more errors!!!
Two types of errors:
Syntax error and Semantics error
Syntax error:
A syntax error is similar to a grammatical error in English. For instance, in
English, it would be wrong to say "He ARE a programmer." Also, in programming
languages, too, there are certain rules we have to follow, which differ from one
language to another. For instance, in Python, indentation is required when
writing the code.
Semantic error:
A semantic error is similar to an error in which the meaning of a sentence is
distorted. For example, in English, the sentence, "The sun rises from the west." is
grammatically correct, but the meaning is incorrect since the sun rises from the
east. In programming, such errors also occur. Let us look a program that adds
two numbers.
Here is the pseudo-code of an Addition program:
input num1, num2
sum= num1 - num2
display sum

From the pseudo-code above, we can see that even though we are supposed to
add the two numbers, we are in fact subtracting the two numbers. This is called
a semantic error.

Debugging
In the process of coding, debugging is a very important process. Simply
speaking, the act of fixing bugs(or errors) in a program is known as debugging.
Debugging is extremely important in that a program usually does not work 100%
correctly when the program is finished so bugs need to be fixed in order for the
program to work smoothly.

Introduction to BYOB
BYOB is a visual programming language that makes use of blocks of code to
program. Hence, you do not need to personally type the code, but drag and drop
the blocks of pre-written code to program. It is implemented from the
programming language, Scratch, but BYOB has additional features.

You might have seen the language called Snap!. It is basically the same as BYOB!
BUT...Snap! runs on your browser. For BYOB, you will need to download the
software onto your computer.

Below is the work space of BYOB/Snap!

(From http://snap.berkeley.edu/)

You might also like