0% found this document useful (0 votes)
28 views3 pages

XI - Worksheet - Python Fundamentals Data Handling - CS

Uploaded by

iamalwayssahasra
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)
28 views3 pages

XI - Worksheet - Python Fundamentals Data Handling - CS

Uploaded by

iamalwayssahasra
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

THE AKSHAYA ACADEMY CAMPUS

PALANI, ODDANCHATRAM, COIMBATORE


GRADE: XI WORKSHEET SUBJECT: COMPUTER SCIENCE
PYTHON FUNDAMENTALS AND DATA HANDLING
1. How an Escape sequence is represented?
a) backward slash(\) b) forward slash(/) c) double(//) d) None of the above
2. Which method is used to find the memory location of the variable?
a) id() b) add() c) type() d)None of the above
3. Which of the following is not the correct in context of naming an identifier in python?
a) Identifier can be of any length b) Identifier should not be a keyword
c) we cannot use special symbols like @,!,#,$,% etc in Identifiers
d) Spaces are allowed in identifiers
4. What will be data type of x after the following statement, if input entered is 180?
X=input(‘Enter a number :’)
a) float b) string c) List d) integer
5. Guess the output of the following statement
X=65
Y=53
Z=y
if (x % 2 == 0):
x
else :
print(z)
a) True b) False c) 65 d) 53
6. If i=4+6.5j and j=4+6.5j, then what will be the value of print (i is j)?
a) True b) False c) i d) j
7. If a=16.4 and b=4, then a/b will be evaluated as
a) 4.0 b) 4.1 c) 0.4 d) None of these
8. Predict the output of the following statement
X=16
Y=8
print(x/y)
a) 2.0 b) 2 c) 138 d) 24.0
9. Predict the output of the following statement
X=12
X=5
X=x+x
print(x)
a) 17 b) 4 c) 10 d) none of these
10. Select all options that print hello-how-are-you
a) print(‘hello’,’how’,’are’,’you’)
b) print(‘hello’,’how’,’are’,’you’+’-‘*4)
c) print(‘hello-‘+’how-are-you’)
d) print(‘hello’+’-‘+’how’+’-‘+’are’+’you’)
11. Develop a Python code to find the average of three numbers N1, N2 and N3. Print the result with
an appropriate message.
12. Code in Python to perform all the arithmetic operations on two numeric values Num1 and Num2.
Display the result on screen.
13. If the values of V1 is 10, V2 is 5 and V3 is 0.Perform all the relational operations and display
the results on screen.
14. Write a Python code that demonstrates the use of Logical operators. Use True/1 and False/0 as
operands.
15. Develop a python code to find the value of M=(P+Q)3/P2+Q2
16. Develop a python program To find the roots (R1 and R2) using quadratic equation.
R1=-b+(b2-4ac)0.5/2a R2=-b-(b2-4ac)0.5/2a
17. Guess the out put
a)-15%2 b)6%-3 c) -21%4 d)17% -4 e)3%6 f) 11%2
18. Guess the output
a)-15/2 b) 6/-3 c)-21/4 d) 17/-4 e)3/6 f)11/2
19. Guess the output
a) -15//2 b)6//-3 c)-21//4 d)17//-4 e)3//6 f)11//2
20. Evaluate:
If the values are X=True, Y=True, Z=False
a) X or Y and (not Z) b) X and Z or Y c) Z or X and not X
21. If the value of A=0,B=10,C=2,D=4
a) P=A+B-C*2+D/2 b) M= A+B+D*4+C**3 c) M=(A+B)+(D*4)+(C**3)
22. Which of the following is not valid strings in Python?
(a) “Hello” (b) 'Hello' (c) “Hello' (d) 'Hello” (e) {Hello}
23. What is the difference between a keyword and an identifier?
24. What is none literal in Python?
25. What are literal in Python? How many literals are allowed in Python?
26. Identify the errors and rewrite the corrected code Name=”Rehman’
print (“Greetings!!!’)
print(“Hello”, name)
print (“How do you do?)
27. What is the difference between an expression and a statement in Python?
28. WAP to read temperature in Celsius and convert it into Fahrenheit °C x 9 / 5 + 32= F
29. What will be the output produced by these?
(A) 14//14 (B) 14%4 (C) 14.0/4 (D) 14.0//4
30. What will be the output of the following? 2m
print(len(str(17//4)))
print(len(str(17/4)))
31. What will be the output of the following code? Explain the reason behind output of every line.
A) 5 < 10 or 5 B) 5 < (10 or 5) C) 5 < (5 or 10) D) 5 < 5 or 10
32. WAP to read base, width and height of a parallelogram and calculate it’s area and perimeter.
33. What are immutable and an mutable typed? List immutable and mutable types of python.
34. Identify the types of following literals?
(1) 23.789 (2) 23789 (3) True (4) ‘True”
35. What do you understand by block/ code block/ suite in Python?
36. (a) What is comment? Which operator is used to write comment in Python? Give example.
(b) Write the difference between for loop and while loop. Give syntax and example for each.
(c) What are different arithmetic operators used in Python?
(d) Write the precedence of operators used in Python.
37. (a) Write following arithmetic expressions using operators in Python:
(i) c =a+b
(ii) x = a3 + b3 + c3
(iii) A = πr(r + h)
(iv) x =−b±√b2−4ac
(b) Evaluate the following expression with precedence of operator:
X =(6*5)/3//2+10*20-4
36. (a) Find the output :
x, y =10, 15
if (x <= y):
z=x*y
else:
z = y/x
z=z-10
print(“result =”, z)
(b) Rewrite the following program after finding and correcting syntactical errors and underlining it.
x,y = 0 if (x > y)
x+y = z
print z
(c) What will be the output of the following code:
A = 10
B = 8*2
C = 9.0/4.0
D = “all the best ” * 3
print (“Value are :“, A, B, C, D)
37. What is the maximum possible length of an identifier?
38. How many ways are there in Python to represent an integer literal?
a) Write a Program to Find out the Simple Interest (SI)
b) Find out the output of the Following
x, y=2,6
x, y=y,x+2
print (x, y)
c) What is the difference between an expression and a statement in Python?
39. What is the role of a comment in a comment in a program? Is it necessary to comment every line
of code?
40. Find out the valid identifier: _abc_d, break, 1rak, doc14, a2bc5, ray.dat
41. What will be the output of the following code:
a=12
b=7.4
c=1
a-=b
print (a, b)
a*=2+c
print(a)
b+=a*c
print( b )
42. a) Find out the output of the Following
x=20
x=x+5
x=x-10
print (x)
x,y=x-1,50
print (x,y)

You might also like