0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

# 3-Looping and Branching

41

Published on

Published in: Education, Technology
0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total Views
41
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
1
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Transcript

• 1. USING CONDITIONAL CODE
• 2. CONDITIONAL CODE If( ) { } condition // your additional code goes here // . . .
• 3. TERMINOLOGY parentheses brackets braces ( ) { } [ ]
• 4. CONDITIONAL CODE If( ) { } condition echo “it’s true!”; // . . . \$a < 50\$b > 20 true or false? \$c == 99\$c === 99\$d != 100 Code block
• 5. EQUALITY If( \$a == \$b ){ // execute this code }
• 6. ASSIGNMENT INSTEAD OF EQUALITY \$a = 5; \$b = 10; If( \$a = \$b ){ // always true! }
• 7. OPERATOR WITH = = assignment == equality === strict equality
• 8. COMPARISON If( \$a == \$b ){ … If( \$a != \$b ){ … If( \$a === \$b ){ … If( \$a !== \$b ){ … If( \$a > \$b ){ … If( \$a < \$b ){ … If( \$a >= \$b ){ … If( \$a <= \$b ){ …
• 9. LOGICAL AND / OR If( \$a === \$b \$c === \$d){… If( \$a === \$b \$c === \$d){… If( (\$a > \$b) && (\$c > \$d) ){… and&& or||
• 10. assingment • Mark Sheet • Even Numbers and Odd Numbers Series • Prime Number Series • Fibonacci Number Series • Generate Star Pyramid • electricity billing system