lecture_8,9

# lecture_8,9 - Lecture9 Pseudocode WhatisPseudocode

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

Lecture 9 Pseudocode

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

View Full Document
What is Pseudo code • “structured English for describing algorithms” • “simplified, half-English, half-code outline of  a computer program” _____________________________________ • An algorithm  is a sequence of steps taken to  solve a problem.
Conditionals Select between  alternate courses of action   depending upon the evaluation of a condition If ( condition = true ) statement block 1 Else statement block 2 End if statement block 1 condition True False statement block 2

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

View Full Document
Selection Selection-  Choose to execute one statement (or group of statements) or  another statement (or group of statements) 1. Begin 2. Prompt for age 3. Get age 4. If ( age < 12 ) 1. Write "Pay children's rate" 2. Write "You get a free box of popcorn" 5. else If ( age < 65 ) 1. Write "Pay regular rate" 6. else 1. Write "Pay senior citizens rate“ 7. End
Pseudocode Functionality Selection Making a choice to execute or skip a statement (or group of

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 01/21/2011 for the course EE 1 taught by Professor Shahidanwar during the Spring '10 term at NUCES.

### Page1 / 15

lecture_8,9 - Lecture9 Pseudocode WhatisPseudocode

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

View Full Document
Ask a homework question - tutors are online