Page 540 - Computer Science V2.0 Class 11
P. 540
18 Assertion(A): Tuple is a mutable data type.
Reason(R): If T = (10, 20, 30, 40), the statement T[2] = 100 will result in an error.
Section-B
19. Rewrite the code given below using for loop.
x = 8
while x >= 0:
print(x)
x = x - 2
20. Sugam has encountered some errors in the program that she had written to display the square of even numbers
and the cube of odd numbers. Rewrite the correct code after removing all syntax and logical errors:
num = input("Enter a number")
if num % 2 = 0:
print(num * num * num)
else
print(num * num )
21. What will be the output produced on the execution of following code segment?
numbers = [12,3,10,5,2,4]
length = len(numbers) - 1
while length > 0:
n1 = numbers[length]
n2 = numbers[length - 1]
if n1 % n2 != 0:
print(n1 * n2, end = '@')
else:
print(n1 + n2)
length = length - 1
22. State De-Morgan Law. Verify this law using a truth table.
23. Write any two characteristics for the following:
a. Open-source software
b. Netiquettes
24. Differentiate between the interactive mode and script mode of Python IDLE.
25. Differentiate between active and passive digital footprint.
Section-C
26. Explain any three methods that can be used to dispose off the e-waste.
27. Draw a flowchart to display factorial of a number.
28. What will be the output produced on the execution of following code segment?
job = "GuiDe#1"
length = len(job)
nwJob = " "
526 Touchpad Computer Science (Ver. 2.0)-XI

