Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 17 If-else statement Nothing is good or bad, but by comparison. Thomas Fuller, Gnomologia.

Similar presentations


Presentation on theme: "Lecture 17 If-else statement Nothing is good or bad, but by comparison. Thomas Fuller, Gnomologia."— Presentation transcript:

1 Lecture 17 If-else statement Nothing is good or bad, but by comparison. Thomas Fuller, Gnomologia

2 Midterm 2 December 2 (please try to attend)

3 Optional problems Problems 1-4, 11, 12

4 IF-THEN-ELSE What if we want to perform different actions depending on the user input or the state of a program. This is really often the case in real life.

5 IF-THEN-ELSE IF THEN … ELSE … if iCount = 10 then writeln( ‘Hello’ ) else writeln( ‘Good bye’ );

6 Boolean operators =Equal to Not equal to <Less than > Greater than >=Greater or equal <=Less or equal

7 Home work Program 5 is due Wednesday, November 18 Chapter 7, sections 7.1-7.4 Optional problems 8, 14 page 315

8 Programs from this lecture Swap Original price First if else program Boys & girls Boo3 Max & min


Download ppt "Lecture 17 If-else statement Nothing is good or bad, but by comparison. Thomas Fuller, Gnomologia."

Similar presentations


Ads by Google