lecture_8,9

lecture_8,9 - Lecture9 Pseudocode WhatisPseudocode...

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

View Full Document Right Arrow Icon
Lecture 9 Pseudocode
Background image of page 1

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

View Full Document Right Arrow Icon
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.
Background image of page 2
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
Background image of page 3

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

View Full Document Right Arrow Icon
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
Background image of page 4
Pseudocode Functionality Selection Making a choice to execute or skip a statement (or group of 
Background image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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 Right Arrow Icon
Ask a homework question - tutors are online