
Testing Lesson
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Hard
Julie Rhoades
Used 2+ times
FREE Resource
8 Slides • 0 Questions
1
M2 L1 PHP
2
Overview
Use conditional statements
if
if...else
switch
Nested statements
2
3
if Statements
Syntax for a simple if statement is:
if (conditional expression)
statement;
If more than 1 statement, they must be in
a block { }
Recommendation: Always include { } to
cut down on errors
3
Indent
for readability
and less errors
4
if Statements, Example
$ExampleVar = 5;
if ($ExampleVar == 5) {
echo "<p>Evaluated to true.</p>";
echo "<p>So these lines print.</p>”;
}
echo "<p>This statement always executes.</p>";
4
Opening and Closing braces.
Needed for a command block
5
if...else Statements
Syntax:
if (conditional expression)
statement;
else
statement;
Example:
$Today = "Tuesday";
if ($Today == "Monday") {
echo "<p>Today is Monday</p>";
}
Else {
echo "<p>Today is not Monday</p>";
}
5
6
Nested Statements
One decision-making statement is
contained within another
$SalesTotal = 60;
if ($SalesTotal > 50){
if ($SalesTotal < 100){
echo "<p>Sales between 50 & 100.</p>";
}
}
6
7
switch Statements
$AmericanCity = "Chicago";
switch ($AmericanCity) {
case "Miami":
Echo "Florida";
break;
case "Chicago":
Echo "Illinois";
break;
case "Los Angeles":
Echo "California";
break;
default:
Echo "United States";
}
7
Break command ends a switch
statement. Needed because
the switch statement does not
automatically stop after a case
match.
Expression
Case Label and value
Default – if no
match above
8
Summary
Use conditional statements
if
if...else
switch
Nested statements
8
M2 L1 PHP
Show answer
Auto Play
Slide 1 / 8
SLIDE
Similar Resources on Wayground
6 questions
Reading Comprehension activity
Presentation
•
University
9 questions
L02 - Intro to Py - IDE setup
Presentation
•
9th Grade
9 questions
INF_elemen 1_kelompok 3
Presentation
•
9th Grade
8 questions
Symmetry
Presentation
•
10th Grade
6 questions
Microsoft Word Básico
Presentation
•
9th Grade
9 questions
Introduction to Linear Functions
Presentation
•
9th Grade
8 questions
Variables and Hypothesis Review
Presentation
•
9th - 10th Grade
6 questions
Rotations on a Coordinate Plane
Presentation
•
8th Grade
Popular Resources on Wayground
20 questions
"What is the question asking??" Grades 3-5
Quiz
•
1st - 5th Grade
20 questions
“What is the question asking??” Grades 6-8
Quiz
•
6th - 8th Grade
10 questions
Fire Safety Quiz
Quiz
•
12th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
34 questions
STAAR Review 6th - 8th grade Reading Part 1
Quiz
•
6th - 8th Grade
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
47 questions
8th Grade Reading STAAR Ultimate Review!
Quiz
•
8th Grade
Discover more resources for Computers
20 questions
“What is the question asking??” English I-II
Quiz
•
9th - 12th Grade
10 questions
Fire Prevention
Quiz
•
9th - 12th Grade
24 questions
BIOLOGY STAAR REVIEW
Quiz
•
9th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
30 questions
English 1 STAAR Review
Quiz
•
9th Grade
46 questions
Linear and Exponential Function Key Features
Quiz
•
9th Grade
20 questions
Grammar
Quiz
•
9th - 12th Grade
30 questions
Biology STAAR Review #3
Quiz
•
9th Grade