Sie sind auf Seite 1von 4

THE SCIENCE SCHOOL

Class Test – Group A

Name: Date:

Subject: Computer Science Class: VIII Section:

Section – I (Short Q/A) [10 Marks]

1. List four main parts of the CPU.

2. What part of the CPU carries out calculations?

3. Why don’t programmers normally write programs in machine language?

4. What is the missing word in this logic statement?

Monday not a holiday THEN go to school.

5. If both inputs to an AND gate are 1, what is the output?

6. How many outputs do gates have?

7. What command can we use to make a list longer OR add an extra element to a list?

8. Write a command that will make/generate a random number between 100 to 1000?

9. This code defines a procedure:

def Line(symbol)

print(symbol * 12)

What is the name of this procedure used? Also name the parameter used with this procedure.

Page 1 of 4
10. This test refers to this short Python program.

testdata = “Rainbow”

with open(“tss.txt”, “w”) as openfile

openfile.write(testdata)

What is the name of the text file? If you opened the file what text would you see in the text file?

Section – II (Long Q/A) [15

Marks]

1. Describe the complete Fetch-Decode-Execute cycle. Support your description with diagrams for

each step. [5]

Page 2 of 4
2. Describe Logic Gates. Sketch the diagrams for AND, OR and NOT gate, also draw Truth Tables for

each gate. [5]

3. Write a complete code to generate a random element. Make sure you make a random list first, then

continue with the code to generate any random element from your list. [5]

Page 3 of 4
Page 4 of 4

Das könnte Ihnen auch gefallen