Grade XII CS Holiday Assignment
Grade XII CS Holiday Assignment
Grade XII CS Holiday Assignment
L2 = [ „Sarika‟, 54 ]
L2 += L1
print( L2)
print (L2 * 2)
x = 'abcd'
3 04.05.23
for i in range(len(x)):
print(i)
3. Write the output of following code:
p=8.6
q=12
r=15
s=450
print(int(p)+q*2)
print(p/2)
print(s//r)
print(float(10+int(p)%5))
print(r%4//2)
4. What will be the output of the following Python code?
myList = [1, 5, 5, 5, 5, 1]
max = myList[0]
indexOfMax = 0
for i in range(1, len(myList)):
if myList[i] > max:
max = myList[i]
indexOfMax = i
print(indexOfMax)
5. What will be the output of the following Python code?
A = [[1, 2, 3],[4, 5, 6], [7, 8, 9]]
print(A[1])
60>= First
< 33 Fail
print (a)
print(nameList[1][-1])
2. sum = 0
for i in range(12,2,-2):
sum+=i
print( sum)
9 10.05.23
3. n=50
i=5
s=0
while i<n:
s+=i
i+=10
print("i=",i)
print ("sum=",s)
4. for i in range(1,6):
for j in range(1,i+1):
print(i, end=" ")
print('\n')
5. n=5
for i in range(1,n+1):
print("*"*i)
for i in range(n-1,-1,-1):
print("*"*i)
5. What is SQL?
1. What is IDLE?
12 13.05.23
2. Define Variable
3. How will you convert a string to an integer in python?
NOTE:
*Submit return copy of all the home works on the school reopen day
* Test will be conducted from the above portions in the first week of June.