2026 QUESTIONS WITH SOLUTIONS
GRADED A+
◍ True or False: A censorship technique can use any combination of criteria
based on content, source IP and destination IP to block access to
objectionable content..
Answer: True
◍ What initial value of x will cause an infinite loop? x = int(input()) while x !=
0: x = x - 2 print(x).
Answer: 7
◍ What is the output? x = 18 while x % 3 == 0: print(x, end=' ') x = x // 3.
Answer: 18 6
◍ A _______ technique can use any combination of criteria based on content,
source IP and destination IP to block access to objectionable content..
Answer: censorship
◍ What is the output? my_list = [3, 7, 0, 2, -1, 8] index = 0 while
my_list[index] > 0: print(my_list[index], end=' ') index += 1.
Answer: 3 7
◍ True or False: DNS injection uses DNS replies to censor network traffic
based on the source and destination IP address..
Answer: False
◍ True or False: With a censorship technique based on packet dropping, all
network traffic going to a set of specific IP addresses is discarded..
Answer: True
◍ With a censorship technique based on ______, all network traffic going to a
, set of specific IP addresses is discarded..
Answer: packet dropping
◍ True or False: With a censorship technique based on packet dropping, all
network traffic going to a set of specific IP addresses is _______..
Answer: discarded
◍ Which is an essential feature of a while loop having the following form?
while loop_expression: loop_body.
Answer: The loop_expression should be affected by the loop_body
◍ True or False: When using DNS Poisoning, all traffic passes through a
proxy where it is examined for content, and the proxy rejects requests that
serve objectionable content..
Answer: False
◍ True or False: When using the Blocking with Resets technique, if a client
sends a request containing flaggable keywords, only the connection
containing requests with objectionable content is blocked..
Answer: True
◍ How many times does the while loop execute for the given input values of
-1 4 0 9?user_num = 3 while user_num > 0: #Do something user_num =
int(input()).
Answer: 3
◍ Which expression replaces ZZZ to make the loop ask for names until 'quit' is
entered? name = input("What is your name ('quit' to exit)? ") while ZZZ:
print(f'Hello, {name}') name = input("What is your name ('quit' to exit)? ").
Answer: name != 'quit'
◍ How many times will the body of the loop be executed? number = 70 guess
= 55 while number != guess: if number > guess: guess = guess + 10 else:
guess = guess - 1 print(f'The number is: {guess}').
Answer: 3
◍ Fill in the blank so that the loop displays all odd numbers from 1 to 100. i =