Computer Science Assignment
Computer Science Assignment
Computer Science
Class 12
1 „Welcome‟ is literals
2 $symbol can be used in naming an identifier(True/False)
3 Write any 2 data types available in Python
4 „Division by zero‟ is an example of error.
5 range(1,10) will return values in the range of to
6 randint(1,10) will return values in the range of to
“Computer Science”[0:6] =
7
“Computer Science”[3:10] =
“Computer Science”[::-1] =
“Computer Science”[-8:]=
8 Output of: print(“Ok”*4+“Done”)
9 Output of: print(print(“Why?”))
Raj was working on application where he wanted to divide the two
number (A and B) , he has written the expression as C = A/B, on
execution he entered 30 and 7 and expected answer was 4 i.e. only
10 integer part not in decimal, but the answer was 4.285 approx, help
Raj to correct his expression and achieving the desired output.
Correct Expression :
Page:1
16 Output of:
(i) True+True=
(ii) 100+False=
(iii) -1+True=
(iv) bool(-1+True)=
17 Output of
(i) 2*7 =
(ii) 2**7 =
(iii) 2**2**3 =
(iv) 17%20 =
(v) not(20>6)or(19>7)and(20==20) =
18 Output of:
a,b,c=20,40,60 b+=10
c+=b
print(a,b,c)
Page:2