ELS language SchoolComputer Department 3rd prep Computer Exam
Name: ------class: ------
General revision term2 (year 2017)
First:Put True OR False and correct the wrong:
- The Variables of types (Single & Double) are used to store integers only. ( )
- The using of (Else) keyword is optional in If statement.( )
- The (Select…Case) statement is used if there are more than two possible branches.( )
- Logical error happens when user inputs numerical datatype instead of character datatype.( )
- VB.net allows the (Implicit Conversion) in assignment statement if the value assigned in the right side is compatible with the data type of variable in the left side. ( )
- Variables and constants cannot be used except in the scope of their declaration.( )
- The function IsNumeric () is used to check if the value is numeric and returns true or not so it returns false. ( )
- In (IF) statement the code that follows (Then) is executed when the result of the conditional expression is (False). ( )
- Rem is the Keyword used to add comments inside the code window.( )
- One of the ways to Prevent the Runtime Errors is using (Try….Catch) statement( )
- In case the value of keyword Step in (For .. Next) loop takes zero, the loop will repeated infinite number of repetition and never stops. ( )
- Anonymity is a form of cyber bullying. ( )
- Const B_ As Date = 7/2/1977 is the correct declaration for a constant . ( )
- In ( For ..next )looping statement the keyword step is a must. ( )
- You can use a variable of type( Byte) to store the value (400) ( )
Second : Choose the correct answer:
- ------is the property that displays the item in (ListBox) control.
( Checked –- Items - Text )
- ------data type is used to store the logical value (true /false) .
( Char – Date - Boolean - Integer )
- The result of the following arithmetic operation: 10*5 - (4+3 ) ^ 2is------.
( 22 – 0 - 20 - 1 )
- ------is the mathematical operator that computes the remainder of the division expression.
( ^ – / - + - Mod)
- One of these variable names is invalid in Visual Basic.net
( UserAddress2 – User_Address - User@Address - none of the previous)
- (Focus)is a ------for the TextBox that used to set the cursor focus inside the TextBox.
( Property – Method - Control )
- The reserved word ------is used to create a new line.
(VbCrLf – Me - Dim - Underscore_ )
- The branching ------statement is used to check more than one conditional expression on one variable:
[(IF …. Then) – (IF…. Then ….Else)– (Select ….Case)]
- The error in this line of code :( Dem x as short) is considered a ------
( Syntax Error – Logical Error- Runtime Error – All the previous)
- The storage space in memory is occupied by the data type (Integer) is------
( 1 Bytes – 2Bytes - 3 Bytes - 4 Bytes )
- It is a publication of hostile and vulgar words against one or more through a media and electronic communication.
( Harassment – Stalking - Flaming- Threats )
- ------data type is used to store integers only.
( Char – Decimal - Single - Integer )
- When assigning a value in memory location (address) , this value is ------.
( Adding to the previous value – replacing by the previous value –subtracted from the previous value - – dividedby the previous value )
- Thecommand ( IF … then ) is called ------because it select or ignore one condition
( Single Selection – Multiple Selection - Double Selection– none of the previous)
- The value of (S) after executing this loop ( For S = 5 To 1 Step -1) is ------
( 0 – 1 - 2 – 5)
------
Third :Complete:
- ------is the Keyword used to declare a variable where ------is the Keyword used to declare a Constant.
- ------, ------is the Keyword used to add comments inside the code window and compiler will neglect it.
- ------is used to handle the errors during the program execution.
- ------is a reserved word that expresses the current Form
- The reserved word ------is used to create a new line.
- The symbol ------is used to perform the concatenation of texts.
- ------are used while assigning date or Time to a constant and ------are used while assigning abstract value to a variable of String data type.
- The symbol ------is represent the assignment operator in VB
- ------enables writing the long line of code in more than one line.
- ------is a part of the code its result True or false according to a value or variables.
- Declaration of sub procedures or function procedures is done on the ------level.
- Procedures in VB.net have two types ------value and ------that returns value.
- ------is a method used to set the cursor focus inside textbox control.
- The values 3, 5 in this code (TextBox2.Text = Sum (3, 5) ) are called ------
- We use ------loop statement when we don`t know the number of prepetition in advance.
------
Fourth : With the help of the code, complete the followings :
(For … Next ) Loop / (Do …. While ) LoopDim X , I As single
X = 4.5
For I = 0 To 7 Step 3
X = X * 2
Next
(A) This loop will be repeated for …………… times .
(B) The loop ends when ……………………………………………......
(C) The value of the variable X after the loop ……………
D)Rewrite the codes using DO …. While loop
Fifth : When this commands And keyword used:
command / usage1 / IF…Then
2 / IF…Then… Else
3 / For…. Next
4 / Select …. case
5 / Do…While..Loop
6 / Function
7 / Sub
8 / Comparison Operators
Sixth : Consider the following code, which receives the user age entered in (TextBox1)and types and displays a quote according to the age.
Dim age As Byte
age = Me . TextBox1 . Text
Select Case age
Case 40
Label1 . Text = " Mature "
Case IS < 2
Label1 . Text = " Baby "
Case 2 To 10
Label1 . Text = " Child "
Case 12 To 19
Label1 . Text = " Teenager "
Case IS > = 20
Label1 . Text = " Adult "
Case Else
Label1 . Text = " Out Of The Game"
End Select
Write down the result displayed in (Label 1), when you enter the following values of age in Textbox1
Age / 16 / 20 / 9 / 40 / 11 / 1Result
Seventh :Write the codes to :
- Display the even numbers in descending order from 1 to 20 in MsgBox using (For ..Next).
- Copy the contents of TextBox1 control in TextBox2 .
- clear the items from ListBox1.
- Assign the value of TextBox1.Text to the variable Degree.
1