
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
4 questions
ETIQUETAS HTML
Presentation
•
6th Grade
6 questions
Trend Lines or Lines of Best Fit
Presentation
•
8th - 9th Grade
9 questions
Review: Graphing Absolute Value Functions
Presentation
•
9th Grade
6 questions
Берілген сипаттары бар элементті іздеу.
Presentation
•
9th Grade
7 questions
11.8 Correlation vs. Causation
Presentation
•
9th Grade
8 questions
Structura alternativa simpla
Presentation
•
9th Grade
5 questions
Morning Community
Presentation
•
9th Grade
2 questions
Phần mềm bảng tính
Presentation
•
KG
Popular Resources on Wayground
6 questions
Secondary Safety Quiz
Presentation
•
9th - 12th Grade
10 questions
MyPath Diagnostic Overview
Presentation
•
6th - 8th Grade
20 questions
Lab Safety Quiz
Quiz
•
6th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Adding and Subtracting Decimals
Quiz
•
5th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
21 questions
Lab Safety
Quiz
•
10th Grade
Discover more resources for Computers
20 questions
Early Computing
Quiz
•
7th - 12th Grade
20 questions
Module 1 Topic 1 Vocabulary
Quiz
•
9th - 12th Grade
10 questions
Exploring Computer Hardware and Software Components
Interactive video
•
6th - 10th Grade
14 questions
Introduction to Digital Citizenship
Quiz
•
9th Grade
39 questions
Safety Review
Quiz
•
9th - 12th Grade
20 questions
Digital Citizenship
Quiz
•
8th - 12th Grade
25 questions
OSHA and Lab Safety
Quiz
•
9th Grade
22 questions
Electronic Computing
Quiz
•
8th - 12th Grade