Page 174 - Computer Science Class 11 Without Functions
P. 174
2. Assertion(A): 90+3j is a complex number.
Reasoning(R): A complex number is of the form x+yj in which x is called the real part, and y is called the imaginary part.
3. Assertion(A): A boolean value may be True or False.
Reasoning(R): Python considers the numeric value 0 as False and a numeric value other than 0 as True.
4. Assertion (A): Lists and tuples can store multiple data items.
Reasoning(R): A list is mutable while a tuple is immutable.
5. Assertion(A): Set is an unordered data type.
Reasoning(R): A set cannot have duplicate values.
6. Assertion(A): True and False will result in False.
Reasoning(R): An and operator yields True if both the operands are True, and False otherwise.
7. Assertion(A): The following statement will always generate a syntax error.
print(India)
Reasoning(R): If any statement in a Python program violates the rules of a programming language, it results in a syntax
error.
Ans. 1. c 2. a 3. b 4. b 5. b 6. a 7. d
Case Based Questions
1. Sandeep borrowed Rs 1250000 from his friend at the rate of 9%. He has to return the borrowed amount along with
interest after three years. Write a program in Python to calculate the simple interest and then display the total amount that
Sandeep has to pay back to his friend.
Ans: principal = 1250000
rate = 9
time = 3
interest = (principal * rate * time)/100
totalAmount = principal + interest
print('Sandeep has to pay ', totalAmount)
2
2. According to the theory of special relativity by Albert Einstein, the equation, E = mc computes the kinetic energy (E) of
the body by multiplying the mass (m) of the body by the square of the speed of light (c). Anjum wants to write a Python
program to implement the above formula by accepting the values of m. He knows that the value of c is 3*10 m/s . Help her
8
complete the task.
Ans: c = 3*10**8
mass = int(input('Enter the value of mass in kilograms : '))
E = mass * c * c
print('The value of kinetic energy is : ', E, ' Joules')
3. Sumbul has just learned about different data types and operators in Python. She has written the following program. Can
you tell her what outputs she should expect on execution of this program?
answer = True
num = 15.7
checkValue = 10>=num
print( checkValue)
num1 = int(num)
numStr = str(num)
print(num1 == num)
print(num1 == numStr)
172 Touchpad Computer Science-XI

