Download presentation
Presentation is loading. Please wait.
1
Computers & Programming Languages
2
Selection – One Way Selection
Lesson3- Objectives Use branched flow chart. Use one way selection to solve problems.
3
Program needs to take decision based on conditions occurrence
Branched Flow Chart Program needs to take decision based on conditions occurrence Condition2 Condition3 Condition1
4
One way selection IF (logical Expression ) الشرط Statement النتيجة
5
One way selection If (mark>= 90) grade = ‘A’;
6
Type the program in P-224 and check the results
Book Practical Activity P-224 Type the program in P-224 and check the results
7
Algorithm Book Activity P-225 End Start Input Speed msg True False
8
Program
9
Compound Block of Statement
When the program execute more statements executed when logical expression evaluates to true we call this “Compound Statement”
10
Book Activity P-227 This msg is suppose to appear for negative and positive numbers
11
Class Activity Book Activity P-229
Total Salary = (salary * 0.22) + Salary
12
Program The msg is written inside the if brackets because I need the msg to appear only if the total salary is > 40
13
Class Activity Create a java program to get the value of x as per the following equations:
14
Program
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.