0% found this document useful (0 votes)
21 views3 pages

Class 8 Computer Science

mkjiji
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)
21 views3 pages

Class 8 Computer Science

mkjiji
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
You are on page 1/ 3

Class 8 Computer Science - Term Examination

Time: 1 Hour
Max Marks: 20

Section A: Multiple Choice Questions (MCQs)

(Each question carries 1 mark)


[6 Marks]

1. What will be the output of the following code?

a=5

b=3

print(a * b + b)

o a) 20

o b) 18

o c) 16

o d) 21

2. Which of the following is not a valid variable name in Python?

o a) my_variable

o b) 5data

o c) data_5

o d) data5

3. The int() function in Python is used to:

o a) Convert a number to an integer

o b) Convert a string to an integer

o c) Both a and b

o d) Convert an integer to a string

4. Which of the following is false about Python?

o a) Python is case-sensitive

o b) Python supports object-oriented programming

o c) Python code needs to be compiled before running

o d) Python supports dynamic typing


5. Convert the binary number 10011 to decimal.

o a) 19

o b) 17

o c) 23

o d) 25

6 . correct output of code

a=98

b=75

a=a%b

print a+b

a)23

b)27

c)29

d)98

Section B: Short Answer Questions

(Each question carries 2 marks)


[8 Marks]

6. Define a conditional statement in Python and write a small code snippet using the if-else
structure.

7. Convert the decimal number 45 to binary. Show the steps involved in the conversion.

8. What is node , link , protocol , bandwidhth ?

9. What does the range() function do in a Python for loop? Write an example that prints numbers
from 1 to 5.

Section C: Long Answer Questions

(Each question carries 3 marks)


[6 Marks]
10. Write a Python program that takes two numbers as input and checks if the first number is
divisible by the second. If it is divisible, print “Divisible,” otherwise print “Not Divisible.” Use
conditional statements in your solution.

11. Explain the working of the while loop in Python. Write a program using a while loop to print the
first 5 even numbers.

You might also like