Page 181 - Information_Practice_Fliipbook_Class11
P. 181
Ans.
DATA VALUES DATA REASON
Number of months in a year Integer Number of months contain only number values (integer).
Resident of Delhi or not Boolean It gives the answer in the form of true and false
Mobile number Integer Mobile number only contain integer number value
Pocket money Float Money can be count as 100rs 50 paisa (100.50)
Volume of a sphere Float The volume can be calculated in the decimal point
Perimeter of a Square Float The perimeter can be calculated in the decimal point
Name of the student String Name is a set of character, hence data type of name of student is string
Address of the student String Address is a set of character, hence data type of address of student is string
4. Give the output of the following when num1 = 4, num2 = 3, num3 = 2
a. num1 += num2 + num3
b. print (num1)
c. num1 = num1 ** (num2 + num3)
d. print (num1)
e. num1 **= num2 + c
f. num1 = '5' + '5'
g. print(num1)
h. print(4.00/(2.0+2.0))
i. num1 = 2+9*((3*12)-8)/10
j. print(num1)
k. num1 = float(10)
l. print (num1)
m. num1 = int('3.14')
n. print (num1)
o. print(10 != 9 and 20 >= 20)
p. print(5 % 10 + 10 < 50 and 29 <= 29)
Ans. a. num1 += num2 + num3
print (num1)
Output:9
b. num1 = num1 ** (num2 + num3)
print (num1)
Output:1024
c. num1 **= num2 + num3
Output:1024
d. num1 = '5' + '5'
print(num1)
Output:55
e. print(4.00/(2.0+2.0))
Output:1.0
f. num1 = 2+9*((3*12)-8)/10
print (num1)
Output:27.2
g. num1 = 24 // 4 // 2 print(num1)
Output:3
h. num1 = float(10) print (num1)
Output:10.0
i. num1 = int('3.14') print (num1)
Output: error
Looping in Python 167

