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
Check Solution below: Python Fundamentals Worksheet Class 11
Q.1: correct identifier-
c) Omega
Q.2:Python is a …………language.
b) High level
Q.3: “Hello”*2=
c) “HelloHello”
Q.4: Not valid in python?
d) X+Y=Z
Q.5: raw_input( ) always return a
a) String
Q.6: symbol is used to begin comment in Python ?
d) #
Q.7: highest precedence in the expression?
d)parentheses
Q.8: Escape sequence for a newline character?
c) \n
Q.9: 22 % 3 will return-
b) 1
Q.10: To determine the data type of a variable we use-
b) type()
Q.11: Data items having fixed values are called Literals
Q.12:Operatorsare tokens that trigger some computation when applied to variables and other objects in an expression.
Q.13:Output :
Answer : 15
13 22
Q.14:Output
Answer : 5,33
Q.15: How are string-literals represented and implemented in Python ?
Answer : A string-literal is represented as a sequence of characters surrounded by quotes (single, double or triple quotes). String-literals in Python are implemented using Unicode.
Q.16: What do you mean by dynamic typing ?
Answer : A variable pointing to a value of a certain type , can be made to point to a value of different type . This is called dynamic typing
.
Q.17:What is the use of indentation in Python ?
Answer : Python uses indentation to create block of code. Statements at same indentation level are part of same block/suite.
Q.18: What is typecasting? Explain with example
Answer: Converting one datatype into another is known as type casting or, type-conversion. For example, if you want to store a ‘long’ value into a simple integer then you can type cast ‘long’ to ‘int’. You can convert the values from one type to another explicitly using the cast operator as follows − (type_name) expression.
Q.19: What are operators ? What is their function ? Give examples of some unary and binary operators.
Answer : Operators are tokens that trigger some computation/action when applied to variables and other objects in an expression. Unary plus (+), Unary minus (-), Bitwise complement (~), Logical negation (not) are a few examples of unary operators. Examples of binary operators are Addition (+), Subtraction (-), Multiplication (*), Division (/).
Q.20: Define:
a) Expressions
Answer: Expressions is any legal combination of symbols that represent value
b) Statements
Answer: A statement is a programming instruction that does something i.e. some action takes place
c) Comments
Answer : Comments are the additional readable information to clarify the source code, which is read by the programmers but ignored by the interpreter.
New CBSE Sample Paper 2021 class 11 Physics Annual Examination Class-XI Subject- Physics Time: 3 hour/M.M.-70 All questions are compulsory. Section A contains 5 questions of 1 mark each. Section B contains 5 questions of 2 marks each. Section C contains 12 questions of 3 marks each. Section D contains 1 value based question of…
Output Based Questions In Python Class 11-12 Computer Science Q 1. Write the output of the following: for i in ‘123’: print(“cbsepython”,i,) Q. 2 for i in [10, 20, 30]: print(i) Q. 3 for i in range (10,6,-2): print (i* 2) Q 4. for i…
(Update 2021) CBSE Sample Paper for class XI Physics Time: 3:00 hour/M.M.-70 All questions are compulsory. Note:-Section A contains 20 questions of 1 mark each. Section B contains 7 questions of 2 marks each. Section C contains 7 questions of 3 marks each. Section D contains 3 questions of 5 marks each. SECTION-A 1- Which…
Last updated on February 19th, 2024 at 10:56 pmClass 12 Computer Science Quiz Unit I: Computational Thinking and Programming – 2 S.N. Topics Covered Quiz 1 Functions: Types of function (built-in functions, functions defined in module, user defined functions), creating user defined function, arguments and parameters, default parameters, positional parameters, function returning value(s), flow…
Last updated on June 5th, 2021 at 11:22 pmPython Data File Handling operations on text file A text file consists of a sequence of lines. A line is a sequence of characters, stored on permanent storage. In a text file, each line is terminated by a special character, known as End Of Line (EOL). Text…
Last updated on February 15th, 2022 at 12:55 pmClass 11 IP Sample Paper Term 2 Set 3 TERM II – 2021-22 Time Duration – 2 hours Maximum Marks : 35 General Instructions:- 1.This question paper contains three parts A,B,C Each part is compulsory . 2.Section A – contains 7 questions each of 2 marks 3….