0% found this document useful (0 votes)
51 views4 pages

Coding Exam Paper for Class VIII

This document is an examination paper for Class VIII on the subject of Coding for the academic year 2025-26. It consists of multiple sections including multiple choice questions, true/false statements, fill in the blanks, definitions, and programming tasks. The paper assesses knowledge on programming concepts such as functions, loops, control structures, and logical operators.

Uploaded by

ek606060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views4 pages

Coding Exam Paper for Class VIII

This document is an examination paper for Class VIII on the subject of Coding for the academic year 2025-26. It consists of multiple sections including multiple choice questions, true/false statements, fill in the blanks, definitions, and programming tasks. The paper assesses knowledge on programming concepts such as functions, loops, control structures, and logical operators.

Uploaded by

ek606060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ST.

ALOYSIUS SENIOR SECONDARY SCHOOL,RIMJHA


TERM 1 (2025-26)
CLASS – VIII SUBJECT – CODING(910) (SET A)
TIME – 2 HOURS MM :50
-----------------------------------------------------------------------------------------------------------------------------------
Section – A(Each question carries ½ mark) (5 marks)

Q1. Multiple choice questions ( 2.5)

1. How does the use of functions help in programming?


a. Reduces the repetition of the same set of statements many times.
b. Makes finding error in the code easier.
c. Enhances the logical transparency of the program
d. All the above
2. Which of the following are the variables accepted by a function to perform the set of tasks defined in its body?
a. Argument b. Function c. Real values d. Parameters
3. Which type of loop can be used till a condition is met?
a. While loop b. For loop c. Nested loop d. if-else condition
4. Which of the following loop contains another loop inside it?
a. While b. For c. Nested d. If-else
5. Which operator negates a condition?
a. OR b. NOT c. AND d. None of the above

Q2. State True or False. (2.5)

1. The keyword elif, checks another statement if previous statement is false.


2. Loops do not repeat a portion of code.
3. In nested loop once the condition is met then the loop gets terminated
4. A function is a block of code that results in a single specific action
5. A function cannot have more than one parameter

Section – B(Each question carries 1 mark) (14 marks)

Q3. Name the following. ( 5)

1. Q11. Who invented the concept of Flowchart?


2. Q6. Which was the first software loop created ?
3. Who created the first software loop?
4. Q5. Who is the first female game designer ?
5. Which was the first designed game?

Q4. Fill in the blanks. ( 4)

1. Relational operator returns ____________ if the value is TRUE.


2. A loop executes a block of code _____________ times.
3. When an operation is performed inside a function it gives back a ____________.
4. Functions remove the ______________ block of code.

Q5. Define. (5)

1. Iteration 2. Loop 3. While loop 4. Function Parameters 5. Functions


Section – C(Each question carries 2 marks) (10 marks)

Q7. Answer the following questions.

1. Write about any 1 Logical Operators.


2. What are Nested Conditional statements?
3. Write any 2 differences between the for loop and the while loop.
4. Write any 2 benefits of using functions?
5. Identify the error and write the correct code:
x=40
y=50
am=x+y+z
print(am)

Section – D(Each question carries 3 marks). (9 marks)

Q8. Answer the following questions.(Any 3)

1. Explain the types of Control Structures.


2. Explain the for loop along with its syntax.
3. Is it possible to return a value from function? If yes, how?
4. Write the output of the following.

1. a=10 2. y=2000 3. num=0


b=20 if(y%4==0): while(num<=5):
c=300 print(“Leap year”) print(num)
print(a,”\t”,b,”\t”,c) else: num=num+1
print(“Not a leap year”)

Section – E(Each question carries 4 marks) (12 marks)

Q9. Answer the following questions. (Any 3)

1. Explain the while loop along with its syntax. (LONG)


2. Write a program to print the Multiplication table of 10 using the for loop or a while loop
3. Write a program to check if a number is divisible by 7 or 8 or by both 7 and 8
4. Write a program print the sum, quotient, Remainder and integer division of 2 numbers.

---xxx---
ST. ALOYSIUS SENIOR SECONDARY SCHOOL,RIMJHA
TERM 1 (2025-26)
CLASS – VIII SUBJECT – CODING(910) (SET B)
TIME – 2 HOURS MM :50
-----------------------------------------------------------------------------------------------------------------------------------
Section – A(Each question carries ½ mark) (5 marks)

Q1. Multiple choice questions ( 2.5)

1. Which of the following help the programmers to avoid rewriting the same logic?
a. Event b. Function c. Redundancy d. Parameter
2. Which of the following are the values passed on to the function?
a. Argument b. Function c. Real values d. Parameters
3. Which of the following describes the loop?
a. Saves time b. Minimizes errors c. Makes the code more manageable d. All of the above
4. Which of the following is the correct syntax to calculate the square of the number?
a. sq=x+x b. sq=x*x c. sq=x-x d. sq=x%x
5. Which operator negates a condition?
a. OR b. NOT c. AND d. None of the above

Q2. State True or False. (2.5)

1. Relational Operators compare the value of two variables.


2. Loops do not save time and minimize errors.
3. Exit criteria differs from program to program.
4. A looping condition must not get false at a certain point of time.
5. Pattern is a series of things that are not repeated in a sequence.

Section – B(Each question carries 1 mark) (14 marks)

Q3. Name the following. ( 5)

1. Who is the Father of Modern Computer Science?


2. Which was the first software loop created?
3. Who created the first software loop?
4. Who is the first female game designer?
5. Which was the first designed game?

Q4. Fill in the blanks. ( 4)

1. Relational operator returns ___________ if the value is TRUE.


2. Loops make the code more ____________ and organized.
3. Functions can be individually _______________
4. Functions remove the ____________ block of code.

Q5. Define. (5)

1. Sequential Control Structure 2. Nested Loop 3. While loop 4. Arguments 5. Functions


Section – C(Each question carries 2 marks) (10 marks)

Q7. Answer the following questions.

1. What are Nested Conditional statements?


2. Explain in detail the exit criteria in a for loop.
3. Write any 2 differences between the for loop and the while loop.
4. Write any 2 benefits of using functions?
5. Identify the error and write the correct code:
x=40
y=50
am=x+y+z
print(am)

Section – D(Each question carries 3 marks). (9 marks)

Q8. Answer the following questions.(Any 3)

1. Explain the and, or and not Logical Operators.


2. Explain the range() function. (SHORT)
3. Is it possible to return a value from function? If yes, how? (SHORT)
4. Write the output of the following.
a. a=10 b. y=2020 c. num=1
b=20 if(y%4==0): while(num<=5):
c=300 print(“Leap year”) print(num)
print(a,”\n”,b,”\n”,c) else: num=num+1
print(“Not a leap year”)

Section – E(Each question carries 4 marks) (12 marks)

Q9. Answer the following questions. (Any 3)

1. Explain the while loop along with its syntax. (LONG)


2. Write a program to print the Multiplication table of 10 using the for loop or a while loop
3. Write a program to check if a number is divisible by 7 or 8 or by both 7 and 8
4. Write a program print the sum, quotient, Remainder and integer division of 2 numbers

---xxx---

Common questions

Powered by AI

For loops are used when the number of iterations is known beforehand as they iterate through a sequence of numbers or elements with a defined endpoint . While loops, on the other hand, are more flexible and run as long as a certain condition is met, making them suitable for scenarios where the number of iterations is unknown or conditional . For instance, for loops are ideal for iterating over an array, whereas while loops are suited for reading data until the data is valid .

Using functions in programming helps reduce the repetition of code, makes error tracing easier, enhances logical transparency, and organizes the code more effectively . Functions encapsulate specific tasks, which allows for code reuse and abstraction, improving efficiency .

A flowchart is a diagrammatic representation of an algorithm or process, detailing the flow of control through different steps. It is credited to Frank Gilbreth, who first introduced the concept. Flowcharts help programmers visualize and analyze the flow of logic within a program, making complex processes clearer and aiding in debugging and development .

Iteration in programming refers to the repetition of a block of code multiple times. It is a fundamental concept that forms the basis of loop constructs like for, while, and nested loops. Iteration allows for the automation of repetitive tasks, enhancing program efficiency by reducing code redundancy . Using constructs like loops, programs can perform repeated operations based on specified conditions or counts, thus optimizing execution cycles and resource use.

Yes, a function in programming can return a value, which is typically implemented using the 'return' statement. This statement ends the function execution and specifies a value to be returned to the call site. By returning values, functions can provide results from computations that can be used in further operations or decisions in the calling scope .

Function parameters allow functions to accept input values, enabling them to perform tasks with variable data, which enhances their flexibility. Parameters act as placeholders within the function's declaration and are replaced by actual values when the function is called. This ability to pass different arguments to functions allows them to be reused across different contexts and inputs .

Logical operators such as AND, OR, and NOT are critical for control flow in programming as they allow for the combination and negation of boolean conditions. The AND operator requires all conditions to be true, OR requires at least one true condition, and NOT negates a condition . For example, 'if (x > 5 AND y < 10)' checks if both conditions are true. 'if (x > 5 OR y < 10)' checks if at least one is true, while 'if NOT(x > 5)' negates the condition .

Nested conditional statements involve placing one conditional statement within another, allowing for multiple levels of decision-making. This structure is essential in complex scenarios where an outcome depends on a series of conditions. For example, in a user authentication system, one could check if a username exists (outer condition) and then verify the password (inner condition) for that username .

A nested loop is a loop within another loop. The inner loop runs its full cycle for every iteration of the outer loop, allowing for multidimensional iteration which is ideal for traversing matrices or complex data structures. This is useful in scenarios like applying operations across rows and columns in matrices or accessing nested lists within lists .

The first software loop was created by Ada Lovelace, known as the first computer programmer. This loop was significant as it introduced the concept of iteration in programming, allowing repetitive tasks to be automated, thus laying the groundwork for more complex programming techniques used today .

You might also like