Quiz 1 Selection Statements - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Quiz 1 Selection Statements

Description:

No talking until all answer sheets are collected. Academic dishonest rule will be enforced if necessary. Quizzes: How do they count? ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 14
Provided by: hiy
Category:

less

Transcript and Presenter's Notes

Title: Quiz 1 Selection Statements


1
Quiz 1Selection Statements
  • CGS 3460, Lecture 14
  • Feb 10, 2006
  • Hen-I Yang

2
Rules of the Quizzes
  • Turn off all electronic device.
  • Put your Gator 1 ID in front of you.
  • Do not start until told to do so.
  • 20 minutes allotted for the quiz.
  • No early turn-in accepted.
  • No talking until all answer sheets are collected.
  • Academic dishonest rule will be enforced if
    necessary.

3
Quizzes How do they count?
  • 80 or above Youll get whatever you receive
    for the homework
  • 60 -- 79 Youll get 90 of what you receive
    for the homework
  • 50 -- 59 Youll get 80 of what you receive
    for the homework
  • 40 -- 49 Youll get 60 of what you receive
    for the homework
  • 39 or below
  • If you score 80 or above in the homework, youll
    be invited for a in-person code review.
  • Otherwise, youll get 60 of what you receive for
    the homework.

4
Quiz 1
Begin
STOP !
20
3
10
5
15
5
Previously
  • Quiz 1
  • If statement

6
Agenda
  • HW 2 (please check out the minor revision posted
    last night)
  • If statement (cont)

7
Selection Statements
  • If Statement
  • Conditional Expressions
  • Switch Statement

8
If Statements
  • If Statement
  • If (expression) statement
  • If (expression) statement else statement1
  • If (the weather is nice)
  • Ill go fishing
  • If (the weather is nice) Ill
  • pick up the fish pole and bait
  • bring the cooler filled with ice
  • drive down to the river
  • and fish

9
if
  • the parenthesis is mandatory
  • no then
  • and

10
Compound Statements
  • if (true) statement1
  • if (true) statement2
  • if (true) statement3
  • ?
  • if (true)
  • statement1
  • statement2
  • statement3
  • treat multiple statements as a single statement
  • Each statement ends with but is not followed
    by

11
else clause
  • example
  • indentation
  • add braces to statements vs. parenthesis in
    expression

12
Summary
  • quiz 1
  • if Statement

13
Before you go
  • Read Chapter 5.
  • Exercise 5.3, 5.10, 5.11
  • Homework 2 due date Feb 21 at 1159 pm.
Write a Comment
User Comments (0)
About PowerShow.com