IT 116: Introduction to Scripting
Class 8

Tips and Examples


Review


New Material


Studying


Microphone

Homework 4

I have posted homework 4 here.

It is due this coming Sunday at 11:59 PM.

Quiz 2

I have posted the answers to Quiz 2 here.

Questions

Are there any questions before I begin?

Tips and Examples

Use Tabs in a Code Block

Misleading Error Messages

Review

Control Structures

Two Types of Control Structures

if Statements

Boolean Expression

Relational Operators

Precedence of Relational Operators

if-else Statements

Indentation in the if-else Statement

Comparing Strings

Nested if Statements

Testing a Series of Conditions

if-elif-else Statements

Attendance

New Material

Logical Operators

Short-Circuit Evaluation

Checking Numeric Ranges with Logical Operators

Precedence of Logical Operators

Boolean Variables

Keep Your Code Short

Studying

Class Exercise

Class Quiz