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.
Simple Billing System in Python Here a simple billing software written in Python. It allows you to create invoices for customers, calculate discounts based on the payment method, and include additional costs for a carry bag. Here’s an explanation of the program for class 11 students: The program starts with an infinite loop using while…
CSV File in Python Class 12 Notes What is CSV File A Comma Separated Values (CSV) file is a plain text file that contains the comma (,) separated data. These files are often used for exchanging data between different applications. CSV files are usually created by programs that handle huge amounts of data. They are…
Important Questions Data Handling Class 11 Computer Science Short Answer Type Questions Q.1 What are data types? What are Python‟s built-in core data types? Ans: Every value in Python has a datatype. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes. There…
Input three numbers and display the largest/smallest number Python Program # Python Program to input 3 numbers and display the largest number #input first,Second and third number num1=int(input(“Enter First Number”)) num2=int(input(“Enter Second Number”)) num3=int(input(“Enter Third Number”)) #Check if first number is greater than rest of the two numbers. if (num1> num2 and num1> num3):…
Class 11 Computer Science Sample Paper MCQ based Term 2 Set-1 Term 2 Examination 2021-22 Class-XI Time:- 1.5 Hours Max. Mark:35 General instructions:- 1. This Question Paper Contains 4 Parts A,B,C,D. 2. Attempt 11 questions in Part-A and all questions in Part-B, C and D. 3. Each Question in Part A carry 1…
What is MongoDB? MongoDB is a cross-platform, simple document-oriented NoSQL database that provides high performance, high availability and easy scalability. It is used for high volume data storage. It is a platform-independent interface which means that it can run on any platform like Windows, Linux, Unix, etc. It was designed to work with community servers….