cps6-110915

Cps6-110915 - • Can have many elifs leave out elif leave out else Making Decisions tools • Boolean values True False • Boolean operators and

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

View Full Document Right Arrow Icon
CompSci 6 Introduction to Computer Science Sept. 15, 2011 Prof. Rodger
Background image of page 1

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

View Full DocumentRight Arrow Icon
Announcements • Read for next time Chap. 6 • Assignment 1 • Reading Quiz on Blackboard – Due before class next time • Today – Finish Classwork 5, Classwork 6 – APT - ReplaceFirstHalf
Background image of page 2
Making Decisions Question ? True False
Background image of page 3

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

View Full DocumentRight Arrow Icon
Making Decisions in Python if condition1 : Block of code to do if condition is true elif condition2 : Block of code to do if condition1 false, condition2 is true else: Block of code to do if other conditions false
Background image of page 4
Background image of page 5

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

View Full DocumentRight Arrow Icon
Background image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: • Can have many elifs, leave out elif, leave out else Making Decisions tools • Boolean values: True, False • Boolean operators: and, or, not • Relational operators: <, <=, >, >= • Equality operators: ==, != • Look at if examples: miscIf.py, javabat X Y X and Y X or Y True True True True True False False True False True False True False False False False More on lists • range (1,11) – Generates a list of numbers from 1 to 10 • Example: for num in range(1,11): print num...
View Full Document

This document was uploaded on 01/17/2012.

Page1 / 6

Cps6-110915 - • Can have many elifs leave out elif leave out else Making Decisions tools • Boolean values True False • Boolean operators and

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