Week 5 Lecture Notes_algorithms variables assignment statements

# Week 5 Lecture Notes_algorithms variables assignment statements

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Algorithm-Procedure that produces the answer to a question or the solution to a problem in a finite number of steps. Example: I gave you an assignment to write down the steps to washing hair. The results you gave me were examples of algorithms. It took some of you 10 steps, and others 25 steps. The algorithm is the solution or the steps at arriving at a solution to a specific problem. As we begin to learn about writing algorithms, we have to understand what variables are. This week you will learn about declaring variables, using variables, data types and assignment statements. When programming, we store the variables in our computer's memory, but the computer has to know what kind of data we want to store in them, since it is not going to occupy the same amount of memory to store a simple number than to store a single letter or a large number, and they are not going to be interpreted the same way. The memory in our computers is organized in bytes. A byte is the minimum amount of memory that we can manage. A byte can store a relatively small amount of data: one single character or a small integer (generally an integer between 0 and 255). In addition, the computer can manipulate more complex data types that come from grouping several bytes, such as long numbers or non-integer numbers. Variable- is a location in the computer’s memory. Which has been specifically reserved for holding data. Fundamental data types When programming, we store the variables in our computer's memory, but the computer has to know what kind of data we want to store in them, since it is not going to occupy the same amount of memory to store a simple number than to store a single letter or a large...
View Full Document

## This note was uploaded on 11/02/2010 for the course CSCI 192 taught by Professor Dr.landry during the Summer '10 term at Baton Rouge CC.

### Page1 / 3

Week 5 Lecture Notes_algorithms variables assignment statements

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online