Page 461 - Computer Science Class 11 With Functions
P. 461
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 given code 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. Write the output of the code given below:
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 theorem. Verify any one law using a truth table.
23. Write any two characteristics for the following:
a. Open-source software
b. Netiquettes
24. What are the two modes of Python. Give at least two differences between the two.
25. The commands can be saved in script mode but not in interactive mode.
26. 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. Predict the output of the code given below:
job = “GuiDe#1”
length = len(job)
Practice Paper 1 (Unsolved) 459

