You are on page 1of 2

Computer

Science
PaperII- Practice Worksheet Grade 10

Instructions:
Write the solutions in the notebook.
1) Write an algorithm in pseudocode, using a single loop, to print 50 names that have been stored in
a Single dimensional array named, Stud_Names[]

2) Write an algorithm in pseudocode to input and store 20 numbers (even and odd numbers) in a
Single Dimensional Array(1D). Calculate and Output the sum of all even numbers and all odd
numbers separately.

3) Write an algorithm in pseudocode to input and store 20 temperatures in °F in a Single


Dimensional Array and Output all the temperatures after converting them into °C.

Hint: (c/5) = (f - 32) / 9

Also write the Pseudocode to Output the converted array in descending order using Bubble
Sort.

4) Consider a 1D array MOB[] which has Mobile numbers of 5 employees stored in it. Another 1D
array, Employees[] has the names of the employees stored in it.
Use Bubble sort to sort the names of the employees in ascending order. Output the names of the
employees along with their Mobile numbers.

[Consider both the arrays are already created with elements stored in it.]

5) Write an algorithm in pseudocode to store 10 numbers (including positive and negative numbers)
in a Single Dimensional Array (1D). Output all the negative numbers followed by the positive
numbers without changing the order of the numbers.

Sample Array:[21, -1, 56, 78, -90, 34, -12]


Sample Output: -1 , -90 ,-12 , 21 ,56, 78 ,34

6) A 2D array is defined as N[4][4] to store numbers. Write an algorithm in pseudocode to input the
numbers and find the sum of all even numbers and product of all odd numbers of the elements
stored in 2D array.

7) A Departmental Shop has 5 stores and 6 departments. The monthly sale of the department is kept
in the 2D Array as m[5][6]. The Manager of the shop wants to know the total monthly sale of each
store and each department at any time. Write an algorithm in pseudocode to perform the given
task.

(Consider that the array is already created and elements stored in it)

NIS/G10/ Paper 2-Practice / WS 3


(Hint: Number of stores as rows and Number of departments as columns.)

8) A Metropolitan Hotel has 5 floors and 10 rooms in each floor. The names of the visitors are
entered in a 2D Array as M[5][10].The Hotel Manager wants to know from the "Enquiry" about the
position of a visitor (i.e. floor number and room number) as soon as he enters the name of the
visitor. Write a program in Java to perform the above task.

9) A Class Teacher wants to keep the records of 40 students of her class along with their names and
marks obtained in English, Hindi, Maths, Science and Computer Science in a 2D Array as
M[40][5]. When the teacher enters the name of a student as an input, the program must Output
the name, marks obtained in the 5 subjects and the total. Write an algorithm in pseudocode to
perform the task.

NIS/G10/ Paper 2-Practice / WS 3

You might also like