0% found this document useful (0 votes)
15 views5 pages

G 11 - WS - LN 3 and 4

Uploaded by

zertvfxbuissness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

G 11 - WS - LN 3 and 4

Uploaded by

zertvfxbuissness
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

LEADERS PRIVATE SCHOOL, SHARJAH

WORK SHEET- I
INFORMATICS PRACTICES

GRADE: XI TOPIC: Ln. 3 – Brief Overview of Python


Ln. 4 - Lists

1. Who developed Python Programming Language?


2. Which of the following are not valid strings in Python?
a) “GoodMorning” b) ‘GoodMorning’ c) “GoodMorning’
3. What is the extension of Python language?
4. If x=2, then what would each of the following Python statements print?
a) print(“x”)
b) print(‘x’)
c) print(x)
d) print(“x + 1”)
e) print(“x” + 1)
f) print( x + 1)
5. Is python case sensitive? What is meant by case sensitive?
6. In how many different ways, can you work in Python? Name them.
7. Find out the error of the following code fragment:
temperature=90
print temperature
8. What will be the output of the following?
a=5
a=25+4-5
print(a)
9. What is the shortcut key to run Python Program?
10. How are keywords different from variable names?
11. What are comments in a python program? Write a comment statement of your own.
12. Name any 2 advantages and 2 limitations of Python programming.
13. Reema is confused between 3*2 and 3**3. Help her to know the difference between the two
expressions.
14. Predict an output of the following:
name=”Prejith”
age=26
print(“Your name and age are”,name+age);

X = 10
X =X+10
X = X//4
print (X)
X, Y = X-2, X%2
print(X, Y)
15. Python is an interpreted language. Justify.
16. What are the rules for naming an identifier?
17. Write the output of-
a) X=10
X=X+10
X=X-5
print(X)
X,Y=X-1,22
print(X,Y);

b) a,b,c=9,12,3
x=a-b/3+c*2-1
y=a-b/(3+c)*(2-1)
z=a-(b/(3+c)*2)-1
print(“x=”,x)
print(“y=”,y)
print(“z=”,z)

18. Which of the following is an assignment operator in Python?


a. == b. === c. >>> d. =
19. Which of the following is used to initialize multiple variables with a common value?
a. x = y: y = 33 b. x = y = z = 33 c. x = z; y = z; x = 33;
20. What are different arithmetic operators used in Python?
21. Find the output-
x = '22' + '3'
print(x)
22. What would range (1, 15, 3) return?
23. Write a Python program to create the multiplication table (from 1 to 10) of a number.
24. Write a python program to acquire marks for a student (out of 100). The program should
display Pass if marks are greater of equal to 33 or else should display Fail.
25. Write a program to print the following pattern
@
@@
@@@
@@@@
@@@@@
26. User input is read as ...?
a. Floating Decimal b. Text String c. Boolean Value d. Integer
27. What will be the output of the following python print statements for the string -
a = ‘WELCOME’
i) a[0] ii) a*2 iii) a[-4:-1] iv) a[:3] +a[3:] v) a[::-1]
28. What will be the output of following?
a) a=20
b=a+1
a=33
print(a+b)

b) a,b=3,4
a,b,c=b,a+3,b-1
print(a,b,c)
29. How many times following loop will execute?
for i in range(10,50,5):
print (i)
30. Define keyword. Give 3 examples.
31. What will be the output after the following statements?
x=5
y=7
x *= y
print(x)
32. what will be the output of following python statements
print(type(100))
print(type(100/2))
print(type('0'))
print(type(5.2))
33. Full form of IDLE
34. What will be the output after the following statements?
x = 'hello'
for i in x:
print(i, end=‘’)

a. h b. hello c. h e l l o d. i x
35. Name the 3 types of errors found in programs.
36. What will be the output of the following code?

A = 18 – 70 + 5
B = 4*3-4
print (“Values are :“, A, B)
37. Find the errors in the following code (if any) and correct the code by rewriting it and
underlining the corrections-
x=int(“Enter value for x : “))
for in range [ 0,11] :
if x = y
print x + y
else :
Print x – y
38. Write a program to input age of a person and print message “Eligible to Vote” if age is more
than 18 otherwise print message “not eligible to Vote”.
39. Find out the data types of these values:
i) 1023 ii) 5j iii) “abc” iv)”9171” v) {12:1, 223:0} vi) [65,’de’,78,100]
40. What would be printed from the following Python code segment?
for i in range(20,0,-2):
print (i)
41. What is the use of eval function?
42. If A= [ 1,3,5] , B= [ 6,7,8] then find ot the following-
A+B ii) A * 3
43. Write difference between append() and extend() methods of list.
44. If X=[22,24,30,32,10,12,14,20, 34] , find out-
X [3:3] b) X[0:5] c) X[-6:6]
45. What is the output when we execute list(“hello”)?
46. What is the output when following code is executed ?
list1 = [11, 13] n = [11, 12, 13, 14] a=[15,100,115,220,235]
list2 = list1 n.append([15,16,17,18]) k=1
list1[0] = 14 print(len(n)) i=a[1]+1
print(list2) j=a[2]+1
m=a[k+1]
print(i,j,m)

list1=[ 16, 13, 28, R=[10,20,30] a=[132,526,127]


80,13,18,80] S=[40,50] a.append([827])
print(list1.index(80)) R.append(55) a.extend([425,627])
print(list1.count(80)) R.extend(S) print(a)
list1.append(list1.count(13)) R.insert(25,2)
print(list1) print(R)
R.sort()
print(R)
print(R+S)
print(R.index(30))
47. Write a Python program to calculate average or mean of a given list of numbers.
48. WRITE THE OUTPUT OF THE FOLLOWING TWO CODING:
L1 = [1, 2, 3]
L2 = [7, 8 ,9]
L1.append(L2)
print(L1)
49. What is the use of these methods- clear() , index() , reverse() , insert()
50. Name the method that will do the following-
• Removes all the items from the list
• Delete a given element from the list
• Arrange the elements of the list
• Count how many times an item occurs in a list
• Delete fifth element from the list

You might also like