Lecture-11(intro to programing-logic-cammands)

# Lecture-11(intro to programing-logic-cammands) - Basics of...

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

Basics of Computer Programming Lecture - 11

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

View Full Document
What is a program? A program consists of a set of instructions that the computer implements one after the other Similar to a set of instructions given to someone for cooking e.g. Boil water Put noodles in water and let cook Stir fry with vegetables and spice
Instruction set Basic Instruction set Boil water Put noodles in water and let cook Stir fry with vegetables and spice Variations are possible, but the results may not be consistent (or desirable) Boil water Pour hot water on noodles, vegetables and spice Stir fry the entire mix Yucky, gooey mess

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

View Full Document
Instruction set Basic instruction set Sub Sine() angle = 30 pi = 22 / 7 x = asin (angle/pi) End Sub Variation Sub Sine() angle = 30 x = asin (angle/pi) pi = 22 / 7 End Sub pi is not defined when x was calculated. The default value of pi = 0 is used for calculating x and since division by zero is not defined, that will result in a error
Concept of Assignment In the previous example:

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.

## This note was uploaded on 04/27/2008 for the course PGE 310f taught by Professor Srinivasan during the Spring '08 term at University of Texas at Austin.

### Page1 / 12

Lecture-11(intro to programing-logic-cammands) - Basics of...

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

View Full Document
Ask a homework question - tutors are online