Python Fundamentals Worksheet Class 11
Python Fundamentals Worksheet Class 11
Q.1: Which of the following is correct as an identifier?
a) Int
b) Surface area
c) Omega
d) 1volume
Q.2:Python is a …………………… language.
a) Low level
b) High level
c) Machine
d) Assembly
Q.3: “Hello”*2=
a) “Hello2”
b) “hellohello”
c) “HelloHello”
d) “Hello2Hello”
Q.4: Which of the following is not valid in python?
a) x=y+z
b) X+=Y
c) X=Y**Z
d) X+Y=Z
Q.5:The raw_input( ) always return a value of …………….. type
a) String
b) Int
c) Float
d) List
Q.6:Which symbol is used to begin comment in Python ?
a) *
b) &
c) @
d) #
Q.7: Which one of the following have the highest precedence in the expression?
a) Exponential
b) Addition
c) Multiplication
d)parentheses
Q.8: Which of the following is an escape sequence for a newline character?
a) \a
b) \t
c) \n
d) \b
Q.9: What is answer of this expression, 22 % 3 is?
a) 7
b) 1
c) 0
d) 5
Q.10: To determine the data type of a variable ……………….. is used.
a) Dtype()
b) type()
c) cast()
d) ndim()
Q.11: Data items having fixed values are called……………..
Q.12: ………………. are tokens that trigger some computation when applied to variables and other objects in an expression.
Q.13:Write the output :
X = 10
X = X + 10
X = X – 5
print (X)
X, Y = X – 2, 22
print (X, Y)
Q.14:Write the output of the following code:
a, b = 10, 30
a, b, a = b, b + 3, a – 5
print( a, b)
Q.15: How are string-literals represented and implemented in Python ?
Q.16: What do you mean by dynamic typing ?
Q.17:What is the use of indentation in Python ?
Q.18: What is typecasting? Explain with example
Q.19: What are operators ? What is their function ? Give examples of some unary and binary operators.
Q.20: Define:
a) Expressions
b) Statements
c) Comments