class 8 comp mid exam
class 8 comp mid exam
Total
Percentage
Grade
Checked by Rechecked by
Section B:
1. Describe how a chatbot collects and processes data to respond to a user's query. Provide one example of
a chatbot application.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
2. Explain the role of TCP/IP in networking. Why is it essential for communication between devices on
the internet?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
3. In a star topology, all devices are connected to a central switch. Describe the basic architecture of a star
topology and explain how it differs from a ring topology.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
4. Write an algorithm to print multiplication table of a given number by using count controlled loop.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
AIC Mid-Year Exam, 2024 Page 2
5. Create Trace Table for the Algorithms below
For x in range (1,6):
Print(x*2)
N=3
Print N
For I from 1 to 3:
N=N+5
Print N
Input n
total = 0
For i = 1 to n
total = total + i
End For
Display "The total sum is: " + total
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
AIC Mid-Year Exam, 2024 Page 3
Given Boolean Expression:
(A AND B) OR (NOT C)
1. Draw the circuit diagram for the simplified expression using AND, OR, and NOT gates.
2. Construct the truth table for the given Boolean expression (A AND B) OR (NOT C).
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________