Monday, March 2, 2020

SEE COMPUTER SCIENCE PRACTICE 2076

SEE COMPUTER SCIENCE PRACTICE 2076





SET 1 - Telecommunication and Computer Network

SET 2 - Internet and Its Services

SET 3 - Computer Security

SET 4 - Computer Virus

SET 5 - Multimedia

SET 6 - Cyber Law and Computer Ethics

SET 7 - Database Management System (MS-Access)

SET 8 - Match the Following

SET 9 - Full Forms

SET 10 - Modular Programming

SET 11 - File Handling

SET 12 - C Programming

SET 13 - Number System

SET 14 - Find Output

SET 15 - Debugging

SET 16 - Analytical Program

SET 17 - Qbasic Programming Sequential Structure

SET 18 - Qbasic Programming Selection and Looping Structure

SET 19 - Qbasic Programming File Handling

SET 19 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 19 --- 20 Questions

SET 19 - Qbasic  Program ----SEE Computer Science 2076 --- Practice Day 19 --- 20 Questions


Group E
1.      Create a sequential data file “std.dat” to store name and marks obtained in English, Math and Science subjects for a few students. [SEE MODEL 2065]
2.      Write a program to store records regarding the information of Book Number, Book’s name and Writer’s name in a sequential data file called “Library.dat”. [SLC 2065 R]
3.      A sequential data file called “MARKS.DAT” contains roll no., name, English, nepali and maths fields. Write a program to display all the contents of data file. [SLC 2065 S], [SLC 2067 S]
4.      Write a program to create a sequential  data file “Employee.dat” to store employees’ name, address, age and gender. [SLC 2066 R]
5.      A data file “LIB.TXT” consists of Book’s name, Author’s name and price of books. Write a program to count and display the total number of records present in the file. [SLC 2066 S]
6.      A sequential data file “EMP.DAT” contains name, post and salary fields of information about employees. Write a program to display all information of employees along with tax amount also.(Tax is 15% of salary) [SLC 2067 R]
7.      A sequential data file called “student.dat” contains some records under the fields Name, English, Nepali and computer. Write a program to add some more records in the same sequential data file. [SLC 2068 R]
8.      Write a program to view those records from “Employee.dat” sequential data file having employee’s name, department, appointment data and salary whose salary is more than Rs 5000. [SLC 2068 S]
9.      Write a program to create a data file “teldir.dat” to store name, address and telephone number of employees according to the need of the user. [SLC 2069 R]
10.   A sequential data file “Staff.dat” contains the name, address, post and salary of the employees. Write a program to read and display all the records stored in the above file. [SLC 2069 S]
11.   A sequential data file called “Marks.dat” contains name, english, nepali, maths and science fields. Write a program to display all the contents of that data file. [SLC 2070 R]
12.   A sequential data file “Record.dat” has records with field name, addres, age and salary. Write a program to display only those records whose age is greater than 26. [SLC 2070 S]
13.   A data file “Salary.dat” contains the information of employee regarding their name, post and salary/ Write a program to display all the information of employee whose salary is greater than 15000 and less than 40000. [SLC 2071 R]
14.   A sequential data file called “Marks.dat” has stored data under the field heading Roll No, Name, English, Nepali and maths. Write a program to display all the information of those students whose marks in Nepali is more than 50. [SLC 2071 S]
15.   A sequential data file called “Marks.dat” contains NAME, AGE, CITY AND TELEPHONE fields. Write a program to display all the contents of the data file. [SEE 2072]
16.   Create a data file to store the records of few employees having Name, Address, Post, Gender and Salary fields. [SEE 2073]
17.   Write a program to store Roll no., Name, Class and Address of any five students. [SEE 2074]
18.   A data file "STAFF. dat" has stored records of few employees with EmPID, First name, Lastname, post and salary. Write a program to display all the records of the employees whose salary is more than  40,000. [SEE 2075]
19.   Write a program to create a sequential data file "salary.data" to store programmer's Name, salary and post according to the need of the user. [SEE 2075 S2]
20.   A Sequential data file called "SEE.DAT" has stored data under the field heading Symbol No., Name, English, Nepali, Maths and Computer. Write a program to display all the information of those students whose marks in Computer is more than 80. [SEE 2074 S]

SET 18 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 18 --- 15 Questions




Group B
1.      Write a program using FUNCTION to get a word from the user and print the word in the reverse order.

 

DECLARE FUNCTION REV$ (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "REVERSED STRING IS "; REV$(S$)

END

 

FUNCTION REV$ (S$)

FOR I = LEN(S$) TO 1 STEP -1

B$ = MID$(S$, I, 1)

W$ = W$ + B$

NEXT I

REV$ = W$

END FUNCTION

 

Write a program using sub to get a word from the user and print the word in the reverse order.

 

DECLARE SUB REV (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL REV(S$)

END

 

SUB REV$ (S$)

FOR I = LEN(S$) TO 1 STEP -1

B$ = MID$(S$, I, 1)

W$ = W$ + B$

NEXT I

PRINT "REVERSED STRING IS "; W$

END FUNCTION

 

 

Write a program using FUNCTION….END FUNCTION to input a string and count the total number of consonants.

 

DECLARE FUNCTION COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "TOTAL NO. OF CONSONANTS= "; COUNT(S$)

END

 

FUNCTION COUNT (S$)

CC = 0

FOR I = 1 TO LEN(S$)

B$ = MID$(S$, I, 1)

C$ = UCASE$(B$)

IF C$ <> "A" AND C$ <> "E" AND C$ <> "I" AND C$ <> "O" AND C$ <> "U" THEN CC = CC + 1

NEXT I

COUNT = CC

END FUNCTION

 

Write a program to find the numbers of vowels in an input string using ‘SUB…..END SUB’. 

 

DECLARE SUB COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL COUNT(S$)

END

 

SUB COUNT (S$)

VC = 0

FOR I = 1 TO LEN(S$)

B$ = MID$(S$, I, 1)

C$ = UCASE$(B$)

IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN VC = VC + 1

NEXT I

PRINT "TOTAL NO. OF VOWELS= "; VC

END SUB

 

Write a program using FUNCTION... END FUNCTION to count the number of words in a sentence.

 

DECLARE FUNCTION COUNT (S$)

CLS

INPUT "ENTER ANY STRING"; S$

PRINT "TOTAL NO. OF WORDS= "; COUNT(S$)

END

 

FUNCTION COUNT (S$)

WC = 1

FOR I = 1 TO LEN(S$)

B$ = MID$(S$, I, 1)

IF B$ = " " THEN WC = WC + 1

NEXT I

COUNT = WC

END FUNCTION

 

Write a program to declare SUB procedure to print only the vowels from a given word.

 

DECLARE SUB DISPV (S$)

CLS

INPUT "ENTER ANY STRING"; S$

CALL DISPV(S$)

END

 

SUB DISPV(S$)

FOR I = 1 TO LEN(S$)

B$ = MID$(S$, I, 1)

C$ = UCASE$(B$)

IF C$ = "A" OR C$ = "E" OR C$ = "I" OR C$ = "O" OR C$ = "U" THEN D$=D$+ B$

END IF

NEXT I

PRINT “VOWELS ONY ARE”; D$

END SUB

 

 


Group C
1.      Write a program to test whether the given number is positive or negative using SUB…..END SUB. [SEE MODEL 2065 ], [SLC 2066 S]
2.      Using SUB…END SUB Write a program to test whether the given number is completely divisible by 13 or not. [SLC 2067 R]
3.      Write a program to input three different numbers in the main module and then find the greatest number using SUB…END SUB. [SLC 2068 S]

Group D
1.      Using SUB…END SUB Write a program to print the following series 9,7,5,…1. [SLC 2065 R]
2.      Write a program using SUB…END SUB to print the series 1,1,2,3,5,8… upto ten terms. [SLC 2069 R]
3.      Write a program to print natural numbers from 1 to 5 using SUB…END SUB. [SLC 2069 S]
4.      Write a program using SUB…END SUB to print the first ten odd numbers. [SLC 2071 S]
5.      Write a program to print the sum of digits of a given number using SUB procedure. [SLC 2070 S]
6.      Write a program using a SUB procedure module to print the multiplication table of any input number up to tenth terms.[SEE 2075 S2]

SET 17 - Qbasic Program ----SEE Computer Science 2076 --- Practice Day 17 --- 12 Questions

SET 17 - Qbasic  Program ----SEE Computer Science 2076 --- Practice Day 17 --- 12 Questions


PROGRAMMING QUESTION
[9 Marks]

Group A
1.      Write a program to calculate the volume of a cylinder using FUNCTION….END FUNCTION.[SEE MODEL 2065], [SLC 2071 S]
2.      Using FUNCTION….END FUNCTION, Write a program to calculate distance travelled by a body. [SLC 2065R]
3.      Write a program using SUB…END SUB to get radius of circle and then print its area. [SLC 2065 S, SLC 2071 R, 2074, 2074 S]
4.      Write a program using FUNCTION module to calculate and print the volume of a box. [SLC 2066 R]
5.      Write a program using FUNCTION…END FUNCTION to find the average of any two numbers given by the user. [SLC 2066 S]
6.      Using FUNCTION…END FUNCTION Write a program to calculate the average of three numbers. [SLC 2067 R], [SLC 2070 S, SEE 2075]
7.      Write a program using SUB…END SUB to get radius of a circle and then print its circumference. [SLC 2067 S]
8.      Write a program to calculate the area of four walls using SUB…END SUB. [SLC 2068 R], [SEE 2073]
9.      Write a program in QBASIC to find the total surface area of a box using FUNCTION…END FUNCTION. [SLC 2068 S, 2075]
10.   Write a program to calculate and print the simple interest using FUNCTION…END FUNCTION. [SLC 2069 S]
11.   Write a program using FUNCTION…END FUNCTION to get temperature in celsius from the user and then print the temperature in fahrenheit. [SLC 2070 R]
12.   Write a program using FUNCTION…END FUNCTION, to find the area of triangle. [SEE 2072]

Sunday, March 1, 2020

SET 16 - Qbasic Analytical Program ----SEE Computer Science 2076 --- Practice Day 16 --- 25 Questions

SET 16 - Qbasic Analytical Program ----SEE Computer Science 2076  --- Practice Day 16  --- 27 Questions

Analytical Questions [27]

1.      [SEE 2075 S2]
DECLARE   SUB TRIM (W$)
CLS
INPUT "Enter word" ; WO$
CALL TRIM  (WO$)
END
SUB TRIM (WO$)
FOR I = 1 TO LEN (W$)
PRINT LEFT$ (W$, I)
NEXT I
END SUB
i. What will be the output if input string is "SEE" in the above program?
Output
S
SE
SEE
ii. List the real parameter used in the above program.
Ans: Real parameter is WO$

2.      [SQE 2075K]
DECLARE SUB SERIES(A, R, N)
CLS
INPUT "ENTER FIRST TERM"; X
INPUT "NUMBER OF TERMS TO BE GENERATED:"; Z
CALL SERIES (X,Y,Z)
END

SUB SERIES (A, R, N)
FOR I = 1 TO N
PRINT A
A=A*R
NEXT
END SUB
a. What will be the output if the user input 3, 2 and 4 for variables X, Y and Z variables?
Ans: The output will be
3
6
12
24
b. What type of parameter X, Y and Z are?
Ans: X, Y and Z are actual parameters.                                                                       
3.      [SLC 2069]
DECLARE  SUB EXAM (N$)
INPUT "Enter Word", WO$
CALL EXAM (WO$)
END
SUB EXAM(N$)
FOR I=1 TO LEN (N$)
PRINT RIGHT$(N$,1)
NEXT I
END SUB
i. Write the names of two built in functions used in the program.
Ans: The names of two built in functions are LEN and RIGHT$
ii. List the real parameter and formal parameter in the program.
Ans: The real parameter is WO$ and formal parameter is N$
4.       [SLC 2066]
DECLARE FUNCTION Num(N)
INPUT N
S=Num(N)
PRINT S
END

FUNCTION Num(N)
X=Int(17/N)
Y=15 MOD N
Num=X +Y
END FUNCTION
i. Write the name of the function used in the above program.
Ans: The name of the function is Num.
ii. List out the mathematical function (Library function) used in the above program.
Ans: The library function is Int( )

5.      [SLC 2065]
DECLARE FUNCTION xyz(N)
FOR I = 1 TO 5
READ N
Z=xyz(N)
S=S+Z
NEXT I
PRINT S
DATA 10,13,15,4,6
END
FUNCTION xyz(N)
IF N MOD 2=0 THEN xyz=N
END FUNCTION
a) What is the name of the function used in the above program?
Ans: The name of the function is xyz
b) How many times the function will be called in the above program?
Ans: The function will be called 5 times.

6.      [SLC 2065 S]
DECLARE FUNCTION Diff(A,B)
CLS
INPUT “Enter first number”;A
INPUT “Enter second number”;B
PRINT “The difference of the two number=”;Diff(A,B)
END
FUNCTION Diff(A,B)
D=A-B
Diff=D
END FUNCTION
i. What will be the output of the program if the user enters 200 as the first number and 100 as the second number.
Ans: The output is:
The difference of the two number=100
ii. Will the program run if the first line (i.e. DECLARE…..) is deleted?
Ans: Yes, the program will run if the first line (i.e. DECLARE…) is deleted.

7.      [SEE 2073]
DECLARE FUNCTION Diff (A, B)
CLS
INPUT "Enter first number" ; A
INPUT "Enter second number" ; B
PRINT "The difference" ; Diff (A, B)
END
FUNCTION Diff (A, B)
difference = A - B
Diff = difference
END FUNCTION.
a)     List all the numeric variables used in the above program.
Ans: The numeric variables are A, B and difference.
b)     List the local variables used in the above program.
Ans: The local variables are A, B and difference

8.      [SEE 2067 S]

DECLARE FUNCTION Prod(A,B)
CLS
INPUT “Enter first number:”;A
INPUT “Enter second number:”;B
PRINT “the product of two number=”;Prod(A,B)
END
FUNCTION Prod(A,B)
      P=A*B
      Prod=P
END FUNCTION
a) List all the numerical variables used in the program.
      The numerical variables are A, B and P
b) List all the local variables used in the program.
      The local variable is P

9.      [SEE 2073 U]
DECLARE FUNCTION SUM (A, B)
INPUT A
INPUT B
X = SUM (A, B)
PRINT X
END
FUNCTION SUM (A, B)
S = A+B
SUM = S
END FUNCTION.
a)      Write the name of local variable used in the above FUNCTION procedure.
Local Variable: S
b)     Write the Mathematical operator and Relation operator used in above program.
Mathematical Operator : +
Relational Operator : =






10.   [SLC 2072]
DECLARE FUNCTION Prod (N)
INPUT "Any Number"; N
X = Prod (N)
PRINT x
END
FUNCTION Prod (N)
F= 1
FOR K = 1 TO N
F = F * K
NEXT K
Prod = F
END FUNCTION
a)     Write the name of the user defined function used in above program.
Ans: The name of the user defined function used in above program is Prod.
b)     Name the loop in above program?
Ans: The name of loop is FOR….NEXT loop.
[SLC 2069 S]
11.   DECLARE FUNCTION CHK$(N)
N=57
PRINT “The number is”; CHK$(N)
END
FUNCTION CHK$(N)
FOR I = 1 TO N
IF N MOD I = 0 THEN C=C+1
NEXT I
IF C>2 THEN
CHK$=”Composite”
ELSE
CHK$=”Prime”
END IF
END FUNCTION
i. Will the above program execute if “DECLARE FUNCTION….” is deleted.
Ans: Yes, the program will run if the first line (i.e. DECLARE…) is deleted.
ii. Why $ sign is used in the name of the above function.
Ans: $ sign is used in the name of the above function because the function returns string value.
12.   [SQE 2074K]
DECLARE SUB PATTRA (N)
N = 7
CALL PATTRA(N)
END
SUB PATTRA(N)
FOR I = 1 to 5
PRINT N
IF N MOD 2 = 1 THEN
N = (N*2) + 1
ELSE
N = N / 2
END IF
NEXT I
END SUB
a) Write the output of the above program?
Ans: The output is:
7
15
31
63
127
b) Write down the function of MOD in the above program.
Ans: The function of MOD operator is to find the remainder.
13.   [SLC 2068]
Declare function count(N$)
Input “Enter a word”; R$
C= Count(R$)
Print C
END
Function count(N$)
For k=1 to LEN(n$)
X$=MID$(N$,K,1)
IF UCASE$(X$)=”A” then
X=X+1
End if
Next K
Count = X
End function
i) List any two library functions used in the above program.
Ans: Any two library functions are LEN( ) and MID$( ).
ii) Write the use of variable ‘C’ inline 3 [i.e. C=Count(R$)] given in the above program.
Ans: The use of variable ‘C’ is to store the value returned by the function count.
14.   [PMT 2075]
DECLARE SUB OT (N$)
N$ = "Computer Science"
CALL OT(N$)
END
SUB OT (N$)
B = LEN(N$)
c = 1
WHILE c <= B
m$ = MID$(N$, c, 1)
PRINT m$;
c = c + 2
WEND
END SUB
a. What is the value of B in the above program?
Ans: The value of B is 16 in the above program.
b. How many parameters are used in the above sub procedure?
Ans: Only one parameter is used in the above program.
15.   [SLC 2066 S]
DECLARE FUNCTION COUNT(A$)
Input “Enter a word”; W$
END
Function Count(A$)
B=LEN(A$)
C$=UCASE$(A$)
FOR I=1 TO B
 E$=MID$(C$,I,1)
 IF E$=”A” OR E$=”E” OR E$=”I” OR E$=”O” OR E$=”U” THEN   C=C+1
END IF
NEXT I
COUNT=C
END FUNCTION
i. List the string Library functions used in the above program.
Ans: The string Library functions used in the above program are LEN( ), UCASE$( ) and MID$( ).
ii. Write down the missing statements in the main module to execute the program.
Ans: The missing statements in the main module to execute the program is PRINT COUNT(W$)


16.    [SLC 2071]
DECLARE SUB Stde(N$U)
FOR Loop = 1 TO 5
READ NM$(Loop)
NEXT Loop
DATA RAMA, PRATIMA, PRASANT
DATA NISHA, RUDHRA
CALL Stde(NM$U)
END

SUB Stde(N$U)
PRINT “Name starting from P”
FOR J = 1 TO 5
C$=MID$(N$,(J),1,1)
IF C$=”P” THEN
PRINT N$(J)
END IF
NEXT J
END SUB
i. List the library function used in the above program.
Ans: The library function used in the above program is MID$( ).
ii. List the conditional statement used in the above program.
Ans: The conditional statement used in the above program is IF….THEN (i.e. IF C$ = “P” THEN).

17.   [SLC 2068 S]
DECLARE SUB ABC(X,Y,Z)
FOR P=1 TO 3
READ A,B,C
CALL ABC(A,B,C)
NEXT P
DATA 5,4,3,2,1,6,7,8,4
END
SUB ABC(X,Y,Z)
T=X+Y+Z
IF T MOD 2 = 0 THEN
PRINT T
END IF
END SUB
i. List any two variables used in the above program.
Ans: Any two variables used in the above program are X and Y
ii. How many times SUB-procedure will be called when program is executed?
Ans: The SUB procedure will be called 3 times.







18.   [SLC 2071 S]
DECLARE FUNCTION JPT (N)
            FOR ctr = 1 TO 6
            READ N
            J = JPT (N)
            Sum = Sum + J
            NEXT ctr
            PRINT Sum
            DATA 10, 20, 30, 40, 50, 60
            END

            FUNCTION JPT (N)
            IF N MOD 2 = 0 THEN JPT = N
            END FUNCTION
a)     What is name to the function used in the above program?
Ans: The name of the function used in the above program is JPT
b)     How many times the function will be executed in the above program?
Ans: The function will be executed six times.

19.   DECLARE FUNCTION B(N)
LET N = 12345
PRINT "Sum of Digits :"; B(N)
END
FUNCTION B(N)
WHILE N <> 0
R = N MOD 10
C = C+R
N = INT(N/10)
WEND
B = C
END FNCITON
i. Write the variables used in the program with their type.
Ans: Numeric variables = N, R and C
ii. List out the different types of operators with their type used in the program.
Ans: Arithmetic Operator = MOD, + and /   :          Relational Operator = < > and =

20.   [SEE 2074 U]
DECLARE   FUNCTION   TEST (X)
X = 100
Z = TEST (X)
PRINT Z
END
FUNCTION TEST (X)
FOR I = 1 TO X      
S = S +I
NEXT I
TEST = S
END FUNCTION.
a)     How many parameters are used in the above program?
1 parameter is used in above program.
b)     How many times does the statement S=S+I get executed in the above program.
The statement S=S+I gets executed 100 times.


21.   [SLC 2067]
DECLARE SUB SUM(N)
INPUT”ANY NUMBER”;N
CALL SUM(N)
END
SUB SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R
N=N\10
WEND
PRINT “SUM”;S
END SUB
a)     In which condition the statements within the WHILE….WEND looping statement will not be executed?
Ans: When the condition is false (i.e. Value of N=0) , the statements within the WHILE….WEND looping statement will not be executed
b)     Will the output be the same if we place “/” instead of”\” in the above program.
Ans: No. the output will not same if we place “/” instead of”\” in the above program.



22.   [SLC 2064]
DECLARE FUNCTION CELLS$(W$)
W$=”CYBER”
PRINT CELL$(W$)
END
FUNCTION CELL$
K=LEN(W$)
FOR I = K TO 1 STEP -2
            M$=M$+MID$(W$,I,1)
NEXT I
CELLS$=M$
END FUNCTION
a)     Why is $(dollar) sign followed in the function name?
Ans: $(dollar) sign followed in the function name because the function returns string value.
b)     What will be the output of the program when it is executed?
Ans: The output is : CBR
c)      What will be the output of the program when FOR loop is changed as FOR I= 1 TO K STEP 2?
Ans: The output is: RBC
d)     What is the name of sign “+” used in the program and what operation does it perform?
Ans: The name of sign “+” is string operator and it is used to join the string i.e. string concatenation.
23.   [SLC 2070]
DECLARE FUNCTION Sum(A,B)
INPUT “Enter first number:”; A
INPUT “Enter second number:”; B
PRINT “The sum of the two number=”;Sum(A,B)
END
FUNCTION SUM(A,B)
S=A+B
Sum=S
END FUNCTION
a) List the numerical variables used in the above program.
Ans: The numerical variables used in the above program are S, A and B.
b) Will the program run if the first line (i.e. DECLARE….) is deleted?
Ans: Yes, the program will run if the first line (i.e. DECLARE….) is deleted
24.   [SLC 2070 S]
DECLARE FUNCTION rev$ (N$)
            INPUT "Any string"; N$
            PRINT rev$ (N$)
END
FUNCTION rev$ (N$)
            FOR X = LEN (N$) to 1 STEP -1
                        A$=MID$ (N$, X, 1)
                        B$ = B$ + A$
            NEXT X
            rev$ = B$
END FUNCTION
a.      List the library function used in the above program.
Ans: The library function used in the above program are LEN( ) and MID$( )
b.     What will be the maximum value of X if the N$ is equal to "Computer".
Ans: be the maximum value of X if the N$ is equal to "Computer" is 8.


25.   [SEE 2074]
DECLARE FUNCTION SUM (N)
INPUT "Enter any number", N
S = SUM (N)
PRINT "The Sum of individual digit is:", S
END
FUNCTION SUM (N)
WHILE N > 0
R = N MOD 10
T = T + R
N = N\10
WEND
SUM = T
END FUNCTION.
State the purpose of using variable S in line 4 in above program.
Ans: The purpose of using variable S in line 4 in above program is to store the value returned by the function SUM.
Write the use of MOD in above program.
Ans: The use of MOD operator is to return the remainder.

26.   [SEE 2075 U]
DECLARE SUB TEST (N$ )
INPUT N$
CALL TEST ( N$ )
END
SUB TEST (N$ )
FOR P = 1 TO LEN ( N$ )
B$ = MID$ (N$, P, 1)
IF LCASE$ (B$) = “a” THEN
C = C + 1
END IF
NEXT P
PRINT C
END SUB
a)     Write the name of the sub procedure used in the above program.
Ans: The name of the sub procedure used in the above program is TEST
b)     Write any two library functions used in the above program.
Ans: Any two library functions used in the above program are MID$( ) and LEN( )

27.   [MM 2076]
DECLARE FUNCTION SUM (N)
FOR I = 1TO 4
READ N
DATA 15 ,25, 69
PRINT SUM (N)
NEXT
END
FUNCTION SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R
N=INT (N\10)
WEND
SUM=S
END FUNCTION
a)     How many times the main function will be executed in the above program?
Ans: The main function will be executed 4 times.
b)     List the relational operators used in the above proram?
Ans: The relational operators used are : = and < >