Presentation is loading. Please wait.

Presentation is loading. Please wait.

3rd prep. – 2nd Term MOE Book Questions.

Similar presentations


Presentation on theme: "3rd prep. – 2nd Term MOE Book Questions."— Presentation transcript:

1 3rd prep. – 2nd Term MOE Book Questions

2 Chapter (1)- Data Questions

3

4

5

6

7 15

8

9 Chapter (2) - Branching Questions

10 The user entered value greater than or equal to 50
Message Box with text “successful” will appear Message Box with text “successful” will appear If Y<0 then If Y<0 then MsgBox (“A negative number “) Code 1 Code 2

11 To check the student’s Grade and Print “ناجح” if X>=50
click Button1 Single Current form ”ناجح“

12 1 2 If country =“Egypt” then MsgBox (“مصر”) Else MsgBox(“Egypt”) End if

13 “ناجح” “راسب” If x > 50 then MsgBox(“ناجح”) else MsgBox(“راسب”) Label2.text=“even” Label2.text=“odd” Dim N As integer

14 Dim X As integer N= Me.TextBox1.text If N mod 2= Then MsgBox (“الرقم زوجي”) Else MsgBox(“الرقم فردي”) End if

15 to determine if the degree is (<0 , = 0 or >0 )
“ تحت الصفر” click Button1 single

16 Chapter (3) - Looping Questions

17 click Button1 Variable , Integer M 1 3 1 4 MsgBox(M)

18 To print the odd numbers from 5 to 9
But_Repeat click Dim (For … Next) Statement Me.Label1.text = Me.Label1.Text & m & vbCrLf Concatenate or append strings together MsgBox (m)

19 To Print the multiplication table of table 3 from 1 to 12 in separate lines inside textbox control.
True True False True True

20 5 Step 2 7 7

21 Dim n , Product As Integer
Dim n , Product As String For n = 1 To 10 For n = 1 To Step -1 Product = 9 * n Product = n Next str Next n

22 Product Str Next m

23 I 1 B C TO Create new line between variables
To print the numbers from 1 to B and increased by C in separate lines inside textbox1 I 1 B C TO Create new line between variables

24 Comparison between Looping Statements
For …Next Statement Do …. While Statement It is one of the limited loop statements used when we want to repeat a code for specific number of time . It needs numeric variable (integer or decimal) to work as a counter with start value , end value and add or increment value . The statement 'Do while ... loop' is used to repeat a specific code for a several times of an unknown end, but based on a specific condition, so they are useful if you do not know the number of iterations emphatically. The repetitive code will be implemented (executed) as long as the counter variable is less than or equal the end value .The loop stops when the value of the counter exceeds the last value. The repetitive code will be implemented (executed) as long as the conditional expression is true. If the condition is not met for any reason, we get out of the iterative loop, and implement the code after the Loop if it exists. General syntax for this statement For Variable = Start To End Step Add Value Repetitive Code Next [Variable] Do While Conditional Expression Repetitive Code Loop

25 To increase the counter variable I by 2
Do … While To increase the counter variable I by 2 To print the odd or even no.`s from 1 to the entered no. Control Method property

26 To receive the value entered by the user in textbox1 and assign it to the variable N in computer memory. Do … While Statement The conditional expression (I <= N) is true TextBox1 N

27 Chapter (3) - Procedures
Questions

28 We can notice the declaration of the following :
1 ."Class" is under the name (Form1) 2"Variables" are under the names (total, i) 3-"Event procedures" are under the name of (Button1_Click, Button2_Click(

29 Here we declare what is so-called (Procedures); this declaration is done only once and then, you recall the procedures many times from anywhere in your program; which avoids code duplication in places where procedures are recalled.

30 Note: In the procedure declaration, we can use more than one Parameter. When the procedure is recalled, we determine values of the outside procedure called (Argument).

31

32 Declaration of Function SUM
Calling of Function SUM

33

34 X X X X

35 X X X Value X Parameters

36 ShowOddOrEven Start Integer Start 2 Start

37 XXX Single YYY - ZZZ RRR

38 Chapter (4) –Cyber Bullying

39 First: State whether the following statements are true ( ) or false (X)
X x Cyber stalking x Cyber threats x

40 Don't send any electronic message when I’m angry&Inform my parents
2-Make a password that is difficult to predict. 3-Don't publish(post) any private data. 8-The download of software from the internet should be done under 6- Be careful! Don't send any electronic message when you are angry. 4-Avoid deleting Cyber bullying messages. Cyber bullying Exclusion Don't send any electronic message when I’m angry&Inform my parents 1-Don't send any respond when I’m angry 2- take the parent's opinion about the appropriate response 3- write a message in a polite way 4-Avoid deleting cyber bullying messages.


Download ppt "3rd prep. – 2nd Term MOE Book Questions."

Similar presentations


Ads by Google