Algorithms & Visual Basic - English @ apepanthiya & Visual Basic - English... · Title: Algorithms...

2
© m% nq oa O Y%S ud,a - www.apepanthiya.com 2013 PRABUDDHA SRIMAL B.Sc.(IT) , RHCSA, CCNA INFORMATION COMMUNICATION TECHNOLOGY G.C.E. Ordinary Level 2013 Grade 11 Duration: 90 minutes Answer All Questions A teacher needs to obtain the places of students according to the marks they obtained for the mid- term test. To create a computer program for this purpose there are two ways of creating an algorithm. i) Draw a flow chart to calculate the total sum of the marks first, then calculate the average and from that calculate the places of the student. ii) Write the pseudo code for the above flow chart. iii) If we use visual basic software to make a simple calculator to add 2 numbers, draw a suitable program interface for it. iv) Label the suitable names for Command buttons, Labels, and Text boxes in it. ( Example: lblCal ) v) Write the VB code for the command button to add the two numbers in the above program. Write the output of the following scenarios. (i). Print NOT(5>2)AND(5<2) (ii). Print 5*2 < 5-2 AND 5*3 > 6 + 1 OR 4-3 < 26 / 2 (iii). 8 MOD 3 (iv). 8 MOD 2 (v). 5 MOD 6 (vi). 2 * 5 / 2 MOD 4 (vii). 9 – 4 * 8 MOD 4 / 3 * 2 ^ 3 + 7 * 2 Create a VB program to convert Celsius value into a Fahrenheit vale. Equation C = 9 / 5 * (F- 32) i) Draw a suitable program interface. ii) Write the coding for this program using following names. lblFah txtCel cmdFind cmdEnd 1. 2. 3.

Transcript of Algorithms & Visual Basic - English @ apepanthiya & Visual Basic - English... · Title: Algorithms...

Page 1: Algorithms & Visual Basic - English @ apepanthiya & Visual Basic - English... · Title: Algorithms & Visual Basic - English @ apepanthiya.lk Author: Prabuddha Srimal Subject: G.C.E

© m%nqoaO Y%Sud,a - www.apepanthiya.com 2013

PRABUDDHA SRIMAL B.Sc.(IT) , RHCSA, CCNA

INFORMATION COMMUNICATION TECHNOLOGY

G.C.E. Ordinary Level 2013

Grade 11 Duration: 90 minutes

Answer All Questions

A teacher needs to obtain the places of students according to the marks they obtained for the mid-

term test. To create a computer program for this purpose there are two ways of creating an

algorithm.

i) Draw a flow chart to calculate the total sum of the marks first, then calculate the

average and from that calculate the places of the student.

ii) Write the pseudo code for the above flow chart.

iii) If we use visual basic software to make a simple calculator to add 2 numbers, draw a

suitable program interface for it.

iv) Label the suitable names for Command buttons, Labels, and Text boxes in it.

( Example: lblCal )

v) Write the VB code for the command button to add the two numbers in the above

program.

Write the output of the following scenarios.

(i). Print NOT(5>2)AND(5<2)

(ii). Print 5*2 < 5-2 AND 5*3 > 6 + 1 OR 4-3 < 26 / 2

(iii). 8 MOD 3

(iv). 8 MOD 2

(v). 5 MOD 6

(vi). 2 * 5 / 2 MOD 4

(vii). 9 – 4 * 8 MOD 4 / 3 * 2 ^ 3 + 7 * 2

Create a VB program to convert Celsius value into a Fahrenheit vale.

Equation C = 9 / 5 * (F- 32)

i) Draw a suitable program interface.

ii) Write the coding for this program using following names.

• lblFah

• txtCel

• cmdFind

• cmdEnd

1.

2.

3.

Page 2: Algorithms & Visual Basic - English @ apepanthiya & Visual Basic - English... · Title: Algorithms & Visual Basic - English @ apepanthiya.lk Author: Prabuddha Srimal Subject: G.C.E

© m%nqoaO Y%Sud,a - www.apepanthiya.com 2013

Bike drivers who are going to participate to

a bike race competition needed to pass a

medical test, and also have to complete 10

rounds in a circular path to pass the

preliminary stage. Bike drivers who

complete the 10 rounds will enter to the

final stage. Other drivers who couldn’t

complete the rounds will eliminate from

the competition.

Following flow chart is to display the average, maximum and the minimum marks of the

students from their subject marks. Write the suitable pseudo code for this flow chart.

4.

© m%nqoaO Y%Sud,a - www.apepanthiya.com 2013

Following Questions from G.C.E. ordinary level examination past

papers. (Source rights: Department of Examinations – Sri Lanka)