0% found this document useful (0 votes)
19 views2 pages

Sample Paper Class 8 Computer

This document is a sample paper for Class VIII Computer subject at G.A.V. International School, consisting of multiple-choice questions, fill-in-the-blanks, true/false statements, one-word answers, short questions, long questions, and a programming task. The paper covers topics related to JavaScript, algorithms, and data structures, with a total of 50 marks allocated. Students are instructed to attempt all questions in order with neat handwriting.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Sample Paper Class 8 Computer

This document is a sample paper for Class VIII Computer subject at G.A.V. International School, consisting of multiple-choice questions, fill-in-the-blanks, true/false statements, one-word answers, short questions, long questions, and a programming task. The paper covers topics related to JavaScript, algorithms, and data structures, with a total of 50 marks allocated. Students are instructed to attempt all questions in order with neat handwriting.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

G.A.V.

INTERNATIONAL SCHOOL
Sample Paper
Name: Subject: Computer
Class: VIII Date:

Time: 2 Hours M.M: 50

General Instructions:
 All questions are compulsory.
 All questions must be attempted in the correct order.
 Hand writing must be neat and legible.

1. Multiple choice questions: (10 x ½ =5)

i. Which of following is extension for an javascript file?


a. .java b. .javascript c. .js d. .javaScript

ii. Which of these statements has one condition and two outcomes?
a. if statement b. if...else...if statement
c. Nested if statement d. if…else statement

iii. Which of the following is not true about variable name?


a. It can contain space. b. It must start with a letter.
c. It cannot have more than 255 characters. d. All of the options.

iv. Which is othername for an object in Javascript?


a. Button b. Key c. Variable d. Constant

v. A spanning tree with n vertices will always have how many edges?
a. n b. n-1 c. n+1 d. 2n-2

vi. Which of the following is not a characteristic of a spanning tree?


a. It must include all vertices of the graph.
b. It must contain cycle.
c. It must have the minimum number of edges to connect all nodes.
d. There can be multiple spanning trees in a single graph.

vii. A function satisfies f(0) = 3, f(1) = 6, f(2) = 9, f(3) = 12. What is the correct function?
a. f(x) = x2 b. f(x) = 3x c. f(x) = x+3 d. f(x) = 3x+3

viii. Which step ensures that the function is adjusted based on new information in an iterative process?
a. Execution b. Validation c. Refinement d. Compilation

ix. What is the primary function of the selection sort?


a. Searching of an element
b. Sorting a list by selecting the smallest element and placing it in order
c. Merging two sorted list
d. Finding the median of a list

x. If a list contains n elements, how many passes does the selection sort algorithm require?
a. n b. n-1 c. n/2 d. 2n

2. Fill in the blanks: (6 x 1 = 6)


a. The values of ___________________remain fixed.
b. _____________is the memory location thar stores values.
c. ______________ operator is used to add two strings.
d. Selection sort works by repeatedly finding the _________________ element and moving it to the correct
position.
e. The process of repeating function modifications until all given conditions are met is called
_______________.
f. A spanning tree does not have a ____________ and cannot be disconnected.

3. Write T for True and F for False for the given statements: (10 x ½ = 5)
a. + operator can also join two numeric values.
b. There are three types of control statements in Javascript.
c. Looping means to repeat the statements multiple times till the condition is true.
d. <script> tag cannot be placed inside the <head> tag.
e. The selection sort algorithm works by comparing and swapping adjacent elements.
f. Selection sort is an unstable sorting algorithm.
g. Validation is the process of checking whether a function satisfies given conditions.
h. The first step in defining a function is iteration.
i. A spanning tree of a connected graph always contains the same number of edges as the original graph.
j. The formula for the number of spanning trees in a clique is n (n – 2).

4. One word answer. (8 x 1 = 8)


a. Which method is used to display a message in a separate window?
b. Which programming language is used for scripting webpages?
c. What function form satisfies f(0) = 0, f(1) = 1, f(2) = 4 and f(3) = 9?
d. In selection sort, how many elements are sorted after the first pass?
e. Which control structure allows an if…else statement within another if…else statement?
f. Which loop executes at least once before checking the condition?
g. What is the term used for checking whether a function satisfies all the given conditions?
h. What is the name of the property that ensures a spanning tree has exactly n-1 edges for n nodes?

5. Answer the following short questions: (6 x 2 = 12)


a. What is a usage of <script> Tag?
b. Write the properties of a spanning tree?.
c. Write the difference between arithmetic and relational operators?
d. What are the key steps involved in the selection sort algorithm?
e. What is the importance of refinement in defining a function?
f. What is the formula to calculate the number of spanning trees form from the graph? Explain with an
example.

6. Answer the following long questions: (3 x 3 = 9)


a. Explain different types of conditional Statemnets?
b. Write different types of data types used in javascript?.
c. Explain the process of sorting the list [111, 123, 80, 95, 132, 171, 70] using selection sort step by step.

7. Write a JavaScript program to print first ten natural numbers using while loop. (5 x 1 = 5)

You might also like