(Grade IX) Exam time



Syllabus

Chapter 1 (Part 5)- Computer Software, Chapter 7- Programming Concept, Chapter 2- Number System, Chapter 3- Block Programming

Question Pattern

MCQs(10X1=10)

Short Q/A (10x2=20)-5 Q/A, 2Number System, 2 Python program, 1 dry run

Long Q/A (5X4=20)- 3 Q/A, 1 scratch, 1 study the program

 

1. Write a Python program to print the area of a circle.

r = float(input("Enter radius: "))

a = (22/7) * r * r

print("Area of circle =", a)

 

2. Write a Python program to print the square of a given number.

n = int(input("Enter a number: "))

s = n * n

print("Square =", s)

 

3. Write a Python program to input the number of days and convert it into years, months and days.

Assume 1 year = 365 days and 1 month = 30 days.

days = int(input("Enter number of days: "))

year = days // 365

days = days % 365

month = days // 30

days = days % 30

print("Year =", year)

print("Month =", month)

print("Days =", days)

 

4. Write a Python program to check whether the input number is positive, negative or zero.

n = int(input("Enter a number: "))

if n > 0:

    print("Positive number")

elif n < 0:

    print("Negative number")

else:

    print("Zero")

 

5. Write a Python program to check whether the input number is odd or even.

n = int(input("Enter a number: "))

if n % 2 == 0:

    print("Even number")

else:

    print("Odd number")

 

6. Write a Python program to check whether the input number is prime or composite.

n = int(input("Enter a number: "))

count = 0

 

for i in range(1, n + 1):

    if n % i == 0:

        count = count + 1

if count > 2:

    print("Composite number")

else:

    print("Prime number")

 

7. Write a Python program to check whether the input number is palindrome or not.

n = int(input("Enter a number: "))

rev = 0

temp = n

for i in range(len(str(n))):

    r = n % 10

    rev = rev * 10 + r

    n = n // 10

if temp == rev:

    print("Palindrome number")

else:

    print("Not a palindrome number")

 

8. Write a Python program to display 5, 8, 11, 14... up to 10 terms.

n=5

for i in range(10):

    print(n, end=" ")

    n = n + 3

 

9. Write a Python program to display 2, 5, 7, 12... up to 10 terms with their sum.

a = 2

b = 5

s = 0

 

for i in range(10):

    print(a, end=" ")

    s = s + a

    c = a + b

    a = b

    b = c

print("Sum =", s)

 

10. Write a Python program to display 7, 22, 11, 34... up to 10 terms.

n = 7

for i in range(10):

    print(n, end=" ")

    if n % 2 == 0:

        n = n // 2

    else:

        n = 3 * n + 1

 

11.  Convert the following:

a. (506) 8 =(?)2

b. (8070)10=(?)16

c. (10100100)2 = (?)16

d. 111010 2 ÷110 2

e. (10111*101)2

f. 11001 2 +10110 2 -1011 2

 

12. Differentiate between Compiler and Interpreter.

Compiler

Interpreter

1. It translates the whole program at once.

1. It translates the program line by line.

2. It shows errors after compiling the program.

2. It shows errors one at a time during execution.

3. It executes the program faster after compilation.

3. It executes the program comparatively slower.

Example: C, C++

Example: Python

13. Differentiate between Primary and Secondary Storage Devices.

Primary Storage

Secondary Storage

1. It stores data that is currently being used by the CPU.

1. It stores data for a long time.

2. It is generally faster.

2. It is generally slower.

3. It has limited storage capacity.

3. It has larger storage capacity.

Example: RAM, ROM

Example: Hard disk, Pen drive

14. What are storage devices, and how are they classified?

Storage devices are hardware components used to store data, information and programs in a computer.

They are classified into two types:

1. Primary Storage: It stores data and instructions currently used by the CPU. It is faster and has limited capacity.

Examples: RAM and ROM.

2. Secondary Storage: It stores data and programs for future use. It has larger storage capacity.

Examples: Hard disk, SSD, CD and Pen drive.

15. Differentiate between System Software and Application Software.

System Software

Application Software

1. It controls and manages computer hardware.

1. It helps users perform specific tasks.

2. It is necessary to operate a computer.

2. It is installed according to the user's needs.

3. It provides a platform to run application software.

3. It runs with the help of system software.

Example: Windows, Linux

Example: MS Word, Photoshop

16. Write functions of software in a computer system.

The major functions of software in a computer system are:

1.     Controlling Hardware: It controls and manages computer hardware devices.

2.     Processing Data: It helps to process raw data into meaningful information.

3.     Managing Files: It helps to create, save, delete and organize files.

4.     Running Programs: It helps users run different programs and applications.

5.     Providing User Interface: It allows users to communicate with the computer.

17. What is utility software? Give examples of it.

Utility software is a type of system software that helps to maintain, protect and improve the performance of a computer.

Examples:

·        Antivirus software

·        Disk Cleanup

·        Backup software

·        File Compression software

18. What is Open-Source Software (OSS)? Name any two popular open-source software programs.

Open-source software (OSS) is software whose source code is freely available for users to view, modify and distribute according to its licence.

Examples:

1.     Linux

2.     LibreOffice

19. What is Block Programming? Write any two advantages and disadvantages of it.

Block Programming: Block programming is a way of creating programs by joining ready-made graphical blocks instead of writing text-based code.

Advantages:

1.     It is easy to learn and understand.

2.     It reduces typing and syntax errors.

Disadvantages:

1.     It has limited features for complex programming.

2.     It provides less flexibility than text-based programming.

20. Explain any three features of Scratch.

1.     Sprites: Sprites are characters or objects used in Scratch projects. They perform different actions.

2.     Stage: It is the area where sprites perform their actions and animations.

3.     Blocks: Blocks are colourful graphical commands used to create programs by joining them together.

21. Differentiate between Block Programming and Text-Based Programming.

Block Programming

Text-Based Programming

1. It uses graphical blocks to create programs.

1. It uses written commands to create programs.

2. It is easy for beginners to learn.

2. It requires knowledge of programming syntax.

3. It has fewer syntax errors.

3. It may have syntax errors due to typing mistakes.

Example: Scratch

Example: Python, C

22. What is looping? Differentiate between for and while loop with example.

Looping: Looping is a process of repeating a set of statements multiple times until a given condition is satisfied.

Difference between for loop and while loop:

For Loop

While Loop

1. It is used when the number of repetitions is known.

1. It is used when the number of repetitions is not known.

2. It is commonly used with range() or a sequence.

2. It repeats as long as the condition is true.

3. It is easier to use for a fixed number of repetitions.

3. It requires a condition to control repetition.

Example:

for i in range(5):

          print(i)

Example:

i=0

while i<5:

      print(i)

i=i+1

23. Explain Source Code and Object Code.

Source Code: Source code is a set of instructions written by a programmer using a programming language. It is written in a human-readable form.

Example: A Python program written by a programmer.

Object Code: Object code is the machine-readable code produced after translating source code using a compiler or assembler.

Example: Machine code containing binary instructions (0s and 1s).

24. What are operators? Explain different types of operators used in Python program.

Operators: Operators are special symbols or keywords used to perform different operations on values and variables.

The different types of operators used in Python are:

1. Arithmetic Operators: Used to perform mathematical operations.

Examples: +, -, *, /, //, %, **

2. Relational (Comparison) Operators: Used to compare two values and return True or False.

Examples: ==, !=, >, <, >=, <=

3. Logical Operators: Used to combine two or more conditions.

Examples: and, or, not

4. Assignment Operators: Used to assign values to variables.

Examples: =, +=, -=, *=, /=

25. What is a Conditional Statement? List the different types of Conditional Statements.

Conditional Statement: A conditional statement is used to make decisions in a program by checking whether a given condition is True or False.

Types of Conditional Statements in Python:

1. Simple if: Executes statements only when the condition is True.

2. if-else: Executes one block when the condition is True and another block when it is False.

3. if-elif-else: Checks multiple conditions and executes the block whose condition is True.

4. Nested if: An if statement written inside another if statement.