{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Lec3 - 2 Introduction to Conditionals Boolean expressions...

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

2. Introduction to Conditionals Boolean expressions The If-Else Construct And, or, not

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

View Full Document
What We Cannot Do If the value of the arithmetic expression Dice1 + Dice2 is seven, then increase the value of the variable GamesWon by one. We cannot make a computation contingent upon other things.
The If-Else Construct Solves this Problem We will introduce this language feature by solving problems about the behavior of a given quadratic on a given interval L <= x <= R. c bx x x q + + = 2 ) (

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

View Full Document
Assume Variables b,c,L,R are Initialized E.g., b = input(‘Enter b’:) c = input(‘Enter c’:) L = input(‘Enter L’:) R = input(‘Enter R’:)