0% found this document useful (0 votes)
3 views

Worksheet On Programming - 2024

Uploaded by

clumsydaisyfx
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Worksheet On Programming - 2024

Uploaded by

clumsydaisyfx
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Science Worksheet: Programming

Prepared by: MNI Niro

Section 1: Multiple Choice Questions (MCQs)

1. What is the purpose of variables in programming?


a) To store constant values
b) To store changing values during program execution
c) To execute program functions
d) To perform mathematical operations

2. Which programming concept involves executing statements one after the other?
a) Sequence
b) Selection
c) Iteration
d) Variables

3. What does the "if" statement represent in programming?


a) Sequence
b) Selection
c) Iteration
d) Variable declaration

4. Which type of loop repeats a block of code until a condition becomes false?
a) For loop
b) While loop
c) Do-While loop
d) If-Else statement

5. What is the purpose of using parameters in procedures and functions?


a) To store global variables
b) To return values from functions
c) To pass values into functions
d) To declare local variables
1
Page
Section 2: Short Questions

6. Explain the difference between variables and constants.

7. How does nesting improve the efficiency of code?

8. Define "iteration" in the context of programming.

9. What is string handling and why is it important in programming?

10. What are the types of operators commonly used in programming?

Section 3: Fill in the Blanks

11. ____________ is used to store data that can change during program execution.
12. The process of executing statements one after the other is known as ____________.
13. In programming, a loop that repeats until a condition becomes false is called a ____________
loop.
14. Parameters are used to pass ____________ into functions.
15. ____________ handling involves manipulating sequences of characters.

Section 4: Advantages and Disadvantages

16. Advantages of using arrays in programming.

17. Disadvantages of using global variables in programming.

18. Advantages of using functions in programming.

19. Disadvantages of using nested loops in programming.

20. Advantages of file handling in programming.


2
Page
Section 5: Arrays

21. Explain the concept of one-dimensional arrays with an example.

22. How are indexes used in arrays?

23. Describe the purpose of two-dimensional arrays.

24. Write a simple program demonstrating the use of arrays for totalling and counting.

25. Discuss the significance of using iteration for reading from and writing to arrays.

3
Page

You might also like