0% found this document useful (0 votes)
15 views1 page

Introduction To Programming

This document introduces some key concepts in programming including storing information using variables, making decisions using if/then statements, repeating tasks using loops, avoiding bugs, and using lists and procedures to organize code. Variables store and represent different types of data, if/then statements help computers make decisions, loops repeat tasks without tiring, debugging is important to find and fix bugs, and lists and procedures can bundle instructions and store multiple values.
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)
15 views1 page

Introduction To Programming

This document introduces some key concepts in programming including storing information using variables, making decisions using if/then statements, repeating tasks using loops, avoiding bugs, and using lists and procedures to organize code. Variables store and represent different types of data, if/then statements help computers make decisions, loops repeat tasks without tiring, debugging is important to find and fix bugs, and lists and procedures can bundle instructions and store multiple values.
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
You are on page 1/ 1

INTRODUCTION TO PROGRAMMING

STORING INFORMATION  The computer needs to remember the


 Use variables in order to keep track of result in order to display it.
things.  Take note that procedures perform tasks
 Labels don’t have to be a real word. while functions return a value.
 Labels can include numbers.
 Using variables can change the value AVOIDING PITFALLS
they represent when running the  Error or bugs will cause the program to
program. produce unexpected results or to stop
 There are different types of information, working.
including words and numbers.  Debugging is an important part of
 Floating-point numbers often occur programming; it means finding and fixing
when dividing whole numbers. bugs.
 Strings have quotation marks and can’t  Syntax bugs can be typos words that
be used in arithmetic. computers can’t process or understand.
 When logic bugs occur, they don’t crash
MAKING DECISIONS but will produce unintended results.
 Rules in computers depend on
conditions(another word for results of USING COMPUTER-SPEAK
evaluation)  Computers are great since they
 In order to help computers make remember and repeat things, but
decisions, use if and then statements. computers can’t understand natural
 If the condition isn’t met but if you want languages.
something else to happen in your  Computers use programming language
program, you can use another and will be translated into machine
statement. language.
 These statements will make the program  Instructions written in programming
more intelligent. language are called source code.

REPEATING THINGS
 When computers can’t think, they will
repeat their tasks without getting bored.
 These repetitive shortcuts are also
called loops.
 A sequence needs to be repeated for a
set number of times.
 Condition-controlled loops repeat
sequences while or until a condition is
met.
 Loops repeat things as often as we
want.

MAKING LIST
 If you want to create multiple values and
the variable can only store a single
value, you can make a list that holds
many values.
 You can also point to the position of the
value in the list.
 You can sort and remove values from a
list.
BUNDLING INSTRUCTIONS
 Programs contain sequences.
 You can reuse a procedure once we
define it.
 Inputting a name to the procedure can
make the program flexible.
 The sequence can also produce
information or output.

You might also like