NCERT Solutions Class 11 Computer Science Chapter 5 Operators in Python have been provided below and is also available in Pdf for free download. The NCERT solutions for Class 11 Computer Science have been prepared as per the latest syllabus, NCERT books and examination pattern suggested in Class 11 by CBSE, NCERT and KVS. Questions given in NCERT book for Class 11 Computer Science are an important part of exams for Class 11 Computer Science and if answered properly can help you to get higher marks. Refer to more Chapter-wise answers for NCERT Class 11 Computer Science and also download more latest study material for all subjects. Chapter 5 Operators in Python is an important topic in Class 11, please refer to answers provided below to help you score better in exams
Chapter 5 Operators in Python Class 11 Computer Science NCERT Solutions
Class 11 Computer Science students should refer to the following NCERT questions with answers for Chapter 5 Operators in Python in Class 11. These NCERT Solutions with answers for Class 11 Computer Science will come in exams and help you to score good marks
Chapter 5 Operators in Python NCERT Solutions Class 11 Computer Science
NCERT Solutions for Class 11 Computer Science Chapter 5 Operators in Python Very Short Answer Type Questions
Question 1: Write the output of the given Python code :
a = 0
a+ =2
print (a)
Answer:
2
Question 2: Write the output of the given Python code :
print (3 + 4)
print (3 – 4)
print (3 * 4) print (3/4)
print (3 % 2)
print (3**4) #3 to the fourth power
print (3 // 4) #floor division
Answer:
7
-1
12
0.75
1
81
0
Question 3: Write the output of the given Python code :
a = 20
if a > = 22:
print(“if”)
elif a >= 21:
print(“elif”)
else:
print(“else”)
Answer: else
Question 4: What is the another name of Comparison Operators?
Answer: Relational Operators.
Question 5: Which Operator is used for assigning a value into a variable?
Answer: Assignment Operators.
Question 6: Which Operator is used for comparison of values?
Answer: Logical Operators.
Question 7: What is the use of “+” operator?
Answer: The “+” operator adds values on either side of the operator.
Question 8: What is the use of operator?
Answer: The operator subtracts right hand operand from left hand operand.
Question 9: What is the use of “*” operator?
Answer: The “*” operator multiplies values on either side of the operator.
Question 10: What is the use of operator?
Answer: The 7″ operator divides left hand operand by right hand operand.
Question 11: What is the use of “%” operator?
Answer: The “%” operator divides left hand operand by right hand operand and returns remainder.
Question 12: What is the use of “**” operator?
Answer: The “**” operator performs exponential (power) calculation on operators.
Question 13: What is the use of 7/” operator?
Answer: The 7/” operator results is the quotient in which the digits after the decimal point are removed.
Question 14: What is the use of “= =” operator?
Answer: It checks if the value of two operands are equal or not, if yes then condition becomes true.
Question 15: What is the use of “! =” operator?
Answer: It checks if the value of two operands are equal or not, if values are not equal then condition becomes true.
Question 16: Why do we use ” < > “operator?
Answer: It checks if the value of two operands are equal or not, if values are not equal then condition becomes true.
Question 17: Describe the use of “>” operator?
Answer: It checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true.
Question 18: Why we use “<” operator?
Answer: The “<” operator checks if the value of left operand is less than the value of right operand, if yes then condition becomes true.
Question 19: What value has been check by ” > = ” operator?
Answer: It checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true.
Question 20: Write syntax for “greater than or equal to” operator.
Answer: a > = b
Question 21: What value have been check by ” < = ” operator?
Answer: It checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true.
Question 22: Is ” < =” a Assignment operator ?
Answer: No,”< =” is not assignment operator.
Question 23: Optimize these statements as a Python programmer.
1 word = ‘word’
2 print word._len_()
Answer:
1 word = ‘word’
2 print len(word)
Question 24: How many types of operations are supported by the Python language ?
Answer:
Python language supports the following types of operations.
• Arithmetic operations
• Comparison (i.e. Rotational) operations
• Assignment operations
• Logical operations
• Bitwise operations
• Membership operations
• Identity operations.
Question 25: What will be the output of the following code :
1 a = 1
2 a, b = a+1, a+1
3 print a
4 print b
Answer:
2
2
Question 26: Is there an equivalent of C’s “?:” ternary operator in Python ?
Answer: No.
NCERT Solutions for Class 11 Computer Science Chapter 5 Operators in Python Short Answer Type Questions
Question 1: What do you mean by Operator precedence?
Answer: Operator precedence determines the grouping of terms in an expression. This affects how an expression is evaluated. Certain operators have higher precedence than others; for example, the multiplication operator has higher precedence than the addition operator.
Question 2: Assume if A = 60; and B = 13; then find the values of the following :
A&B
A|B
Answer:
Here in binary format they will be as follows:
A = 0011 1100
B = 0000 1101
hence
A&B = 0000 1100 and A|B = 00111101
Question 3: Assume if A = 60; and B = 13, then find the values of the following.
A ∧ Band ~A
Answer:
Here in binary format they will be as follows :
A = 00111100 B = 0000 1101
hence
A ∧ B = 0011 0001 and ~A = 1100 0011
Question 4: Explain assigning values to variables in Python.
Answer: Python variables do not have to be explicitly declared to reserve memory space. The declaration happens automatically when you assign a value to a variable. The equal sign (=) is used to assign values to variables.
The operand to the left of the = operator is the name of the variable, and the operand to the right of the = operator is the value stored in the variable.
For example:
# !/usr/bin/python
counter = 100 # An integer assignment
miles = 1000.0 # A floating point
name = “John” # A string
print counter
print miles
print name
while running this program, this will produce the following result:
100
1000.0
John
Question 5: Write the output of the following Python code
a = 6
b = 7
c = 42
print 1, a = = 6
print 2, a = = 7
print 3, a = = 6 and b = = 7
print 4, a = = 7 and b = = 7
print 5, not a = = 7 and b = = 7
print 6,a==7orb==7
print 7, a==7orb==6
print 8, not (a = = 7 and b = = 6)
print 9, not a = = 7 and b = = 6
Answer:
1 True
2 False
3 True
4 False
5 True
6 True
7 False
8 True
9 False
Question 6: What do you mean by expression “a = 5” ?
Answer: This statement assigns the integer value 5 to the variable a. The part at the left of the assignment operator (=) is known as the 1 value (left value) and the right one as the r value (right value). The l value has to be a variable whereas the l value can be either a constant, a variable, the result of an operation or any combination of these.
Question 7: What do you mean by statement in Python?
Answer: A statement is an instruction that the Python interpreter can execute. We have seen two kinds of statements: print and assignment. When you type a statement on the command line, Python executes it and displays the result, if there is one. The result of a print statement is a value. Assignment statements don’t produce a result.
Question 8: What do you mean by expression in Python ?
Answer: An expression is a combination of values, variables, and operators. If you type an expression on the command line, the interpreter evaluates it and displays the result:
Question 9: Explain Operators and Operands?
Answer: Operators are special symbols that represent computations like addition and multiplication.
The values the operator uses are called Operands.
Question 10: Use IDLE to calculate :
(a) 6 + 4 * 10
(b) (6 + 4) * 10
Answer:
(a) 6 + 40 = 46
(b) 10 * 10 = 100
Question 11: What will be the output of the following code :
a = 3 – 4 + 10 b = 5 * 6 c = 7.0/8.0
Answer:
Print “These are the values a, b, c.
These are the values : 9300.0.
NCERT Solutions for Class 11 Computer Science Chapter 5 Operators in Python Long Answer Type Questions
Question 1: Write a example of comparison operators.
Answer: Following example to understand all the comparison operators available in Python programming language:
# !/usr/bin/python
a = 21
b = 10
c = 0
if (a = = b ):
print “Line 1 – a is equal to b”
else:
print “Line 1 – a is not equal to b”
if ( a ! = b ):
print “Line 2 – a is not equal to b”
else:
print “Line 2 – a is equal to b”
if (a <> b):
print “Line 3 – a is not equal to b”
else:
print “Line 3 – a is equal to b”
if ( a < b ):
print “Line 4 – a is less than b”
else:
print “Line 4 – a is not less than b”
if (a > b ):
print “Line 5 – a is greater than b”
else:
print “Line 5 – a is not greater than b”
a = 5;
b = 20;
if (a < = b):
print “Line 6 – a is either less than or equal to b”
else:
print “Line 6 – a is neither less than nor equal to b”
if (b > = a):
print “Line 7 – b is either greater than or equal to b”
else:
print “Line 7 – b is neither greater than nor equal to b”
When you execute the above program it produces following result:
Line 1 – a is not equal to b
Line 2 – a is not equal to b
Line 3 – a is not equal to b
Line 4 – a is not less than b
Line 5 – a is greater than b
Line 6 – a is either less than or equal to b
Line 7 – b is either greater than or equal to b
Question 2: Give an example of arithmetic operators.
Answer: Following example to understand all the arithmetic operators available in Python programming language:
# !/usr/bin/python
a = 21
b = 10
c = 0
c = a + b
print “Line 1 – Value of c is “, c
c = a -b
print “Line 2 – Value of c is “, c
c = a * b
print “Line 3 – Value of c is “, c
c = a/b
print “Line 4 – Value of c is “, c
c = a % b
print “Line 5 – Value of c is “, c
a = 2
b = 3
c = a**b
print “Line 6 – Value of c is “, c
a = 10
b = 5
c = a//b
print “Line 7 – Value of c is “, c
When you execute the above program it produces following result:
Line 1 – Value of c is 31
Line 2 – Value of c is 11
Line 3 – Value of c is 210
Line 4 – Value of c is 2
Line 5 – Value of c is 1
Line 6 – Value of c is 8
Line 7 – Value of c is 2
Question 3: Write a program in Python to explain assignment operators
Answer: Following example to understand all the assignment operators available in Python programming language :
# !/usr/bin/python
a = 21
b = 10
c = 0
c = a + b
print “Line 1 – Value of c is “, c
c += a
print “Line 2 – Value of c is “, c
c *= a
print “Line 3 – Value of c is “, c
c/= a
print “Line 4 – Value of c is “, c
c = 2
c %= a
print “Line 5 – Value of c is “, e
c**= a
print “Line 6 – Value of c is “, c
c//= a
print “Line 7 – Value of c is “, c
When you execute the above program it produces following result:
Line 1 – Value of c is 31
Line 2 – Value of c is 52
Line 3 – Value of c is 1092
Line 4 – Value of c is 52
Line 5 – Value of c is 2
Line 6 – Value of c is 2097152
Line 7 – Value of c is 99864
Question 4: Write source code in Python to explain bitwise operators.
Answer: Following example to understand all the bitwise operators available in Python programming language:
# !/usr/bin/python
a = 60 # 60 = 0011 1100
b = 13 # 13 = 0000 1101
c = 0
c = a & b; # 12 = 0000 1100
print “Line 1 – Value of c is “, c
c = a | b; # 61 = 0011 1101
print “Line 2 – Value of c is “, c
c = a ∧ b; # 49 = 0011 0001
print “Line 3 – Value of c is “, c
c = ~a; # -61 = 1100 0011
print “Line 4 – Value of c is “, c
c = a < < 2; #240 = 1111 0000
print “Line 5 – Value of c is “, c
c = a > > 2; # 15 = 00001111
print “Line 6 – Value of c is “, c
When you execute the above program it produces following result:
Line 1 – Value of c is 12
Line 2 – Value of c is 61
Line 3 – Value of c is 49
Line 4 – Value of c is -61
Line 5 – Value of c is 240
Line 6 – Value of c is 15
Question 5: Write a program in Python to explain logical operators.
Answer: Following example to understand all the logical operators available in Python programming language:
#!/usr/b in/python
a = 10
b = 20
c = 0
if (a and b):
print “Line 1 – a and b are true”
else:
print “Line 1 – Either a is not true or b is not true”
if (a or b):
print “Line 2 – Either a is true or b is true or both are true”
else:
print “Line 2 – Neither a is true nor b is true”
a = 0
if ( a and b ):
print “Line 3 – a and b are true”
else:
print “Line 3 – Either a is not true or b is not true”
if ( a or b ):
print “Line 4 – Either a is true or b
is true or both are true”
else:
print “Line 4 – Neither a is true nor b is true”
if not( a and b) :
print “Line 5 – a and b are true” else:
print “Line 5 – Either a is not true or b is not true”
When you execute the above program it produces following result:
Line 1 – a and b are true
Line 2 – Either a is true or b is true or both are true
Line 3 – Either a is not true or b is not true
Line 4 – Either a is true or b is true or both are true
Line 5 – a and b are true
Question 6: Write source in Python code for membership operators.
Answer: Following example to understand all the membership operators available in Python programming language :
#!/usr/bin/python
a = 10
b = 20
list = [1,2,3,4, 5 ];
if ( a in list):
print “Line 1 – a is available in the given list”
else:
print “Line 1 – a is not available in the given list”
if (b not in list):
print “Line 2 – b is not available in the given list”
else:
print “Line 2 – b is available in the given list”
a = 2
if ( a in list):
print “Line 3 – a is available in the given list”
else:
print “Line 3 – a is not available in the given list”
When you execute the above program it produces following result:
Line 1 – a is not available in the given list
Line 2 – b is not available in the given list
Line 3 – a is available in the given list
Question 7: Write source in Python code for identity operators.
Answer: Following example to understand all the identity operators available in Python programming language :
# !/usr/bin/py thon
a = 20
b = 20
if (a is b):
print “Line 1 – a and b have same
identity”
else:
print “Line 1 – a and b do not have
same identity”
if (id(a) = = id(b)):
print “Line 2 – a and b have
same identity”
else:
print “Line 2 – a and b do not have same identity”
b = 30
if (a is b ):
print “Line 3 – a and b have same
identity”
else:
print “Line 3 – a and b do not have same identity”
if (a is not b ):
print “Line 4 – a and b do not have
same identity”
else:
print “Line 4 – a and b have same identity”
When you execute the above program it produces following result:
Line 1 – a and b have same identity
Line 2 – a and b have same identity
Line 3 – a and b do not have same identity
Line 4 – a and b do not have same identity
Question 11: Give example to understand operator precedence available in Python programming language.
Answer: Following example to understand operator precedence available in Python programming language :
#!/usr/bin/python
a = 20
b = 10
c = 15
d = 5
e = 0
e = (a + b)*c/d #(30*15)/5
print “Value of (a + b) * c / d is “, e
e = ((a + b) * c)/d #(30*15)/5
print “Value of ((a + b) * c) / d is “, e
e = (a + b) * (c / d); # (30) * (15/5)
print “Value of (a + b) * (c / d) is “, e
e = a + (b*c)/d; # 20 + (150/5)
print “Value of a + (b * c) / d is “, e
When you execute the above program it produces following result:
Value of (a + b) * c / d is 90
Value of ((a + b) * c) / d is 90
Value of (a + b) * (c / d) is 90
Value of a + (b * c) / d is 50
Question 12: How are comments written in a program ?
Answer: As the program gets bigger, it becomes difficult to read it, and to make out what it is doing by just looking at it. So it is good to add notes to the code, while writing it. These notes are known as comments. In Python, comment start with ‘#’ symbol. Anything written after # in a line is ignored by interpreter, i.e. it will not have any effect on the program.
For example,
# calculating area of a square > > > area = side * * 2
For adding multi-line comment in a program :
(i) Place ‘#’ in front of each line, or,
(ii) Use triple quoted string. They will only work as comment, when they are not being used as docstring
NCERT Solutions Class 11 Computer Science Chapter 1 Microprocessor and Memory Concepts |
NCERT Solutions Class 11 Computer Science Chapter 1 Software Concepts |
NCERT Solutions Class 11 Computer Science Chapter 7 Functions |
NCERT Solutions Class 11 Computer Science Chapter 8 Strings |
NCERT Solutions Class 11 Computer Science Chapter 10 Lists Dictionaries and Tuples |
NCERT Solutions Class 11 Computer Science Chapter 5 Operators in Python
NCERT Solutions Class 11 Computer Science Chapter 5 Operators in Python is available on our website www.studiestoday.com for free download in Pdf. You can read the solutions to all questions given in your Class 11 Computer Science textbook online or you can easily download them in pdf.
Chapter 5 Operators in Python Class 11 Computer Science NCERT Solutions
The Class 11 Computer Science NCERT Solutions Chapter 5 Operators in Python are designed in a way that will help to improve the overall understanding of students. The answers to each question in Chapter 5 Operators in Python of Computer Science Class 11 has been designed based on the latest syllabus released for the current year. We have also provided detailed explanations for all difficult topics in Chapter 5 Operators in Python Class 11 chapter of Computer Science so that it can be easier for students to understand all answers.
NCERT Solutions Chapter 5 Operators in Python Class 11 Computer Science
Class 11 Computer Science NCERT Solutions Chapter 5 Operators in Python is a really good source using which the students can get more marks in exams. The same questions will be coming in your Class 11 Computer Science exam. Learn the Chapter 5 Operators in Python questions and answers daily to get a higher score. Chapter 5 Operators in Python of your Computer Science textbook has a lot of questions at the end of chapter to test the students understanding of the concepts taught in the chapter. Students have to solve the questions and refer to the step-by-step solutions provided by Computer Science teachers on studiestoday to get better problem-solving skills.
Chapter 5 Operators in Python Class 11 NCERT Solution Computer Science
These solutions of Chapter 5 Operators in Python NCERT Questions given in your textbook for Class 11 Computer Science have been designed to help students understand the difficult topics of Computer Science in an easy manner. These will also help to build a strong foundation in the Computer Science. There is a combination of theoretical and practical questions relating to all chapters in Computer Science to check the overall learning of the students of Class 11.
Class 11 NCERT Solution Computer Science Chapter 5 Operators in Python
NCERT Solutions Class 11 Computer Science Chapter 5 Operators in Python detailed answers are given with the objective of helping students compare their answers with the example. NCERT solutions for Class 11 Computer Science provide a strong foundation for every chapter. They ensure a smooth and easy knowledge of Revision notes for Class 11 Computer Science. As suggested by the HRD ministry, they will perform a major role in JEE. Students can easily download these solutions and use them to prepare for upcoming exams and also go through the Question Papers for Class 11 Computer Science to clarify all doubts
You can download the NCERT Solutions for Class 11 Computer Science Chapter 5 Operators in Python for latest session from StudiesToday.com
Yes, you can click on the link above and download NCERT Solutions in PDFs for Class 11 for Computer Science Chapter 5 Operators in Python
Yes, the NCERT Solutions issued for Class 11 Computer Science Chapter 5 Operators in Python have been made available here for latest academic session
You can easily access the links above and download the Chapter 5 Operators in Python Class 11 NCERT Solutions Computer Science for each chapter
There is no charge for the NCERT Solutions for Class 11 Computer Science Chapter 5 Operators in Python you can download everything free
Regular revision of NCERT Solutions given on studiestoday for Class 11 subject Computer Science Chapter 5 Operators in Python can help you to score better marks in exams
Yes, studiestoday.com provides all latest NCERT Chapter 5 Operators in Python Class 11 Computer Science solutions based on the latest books for the current academic session
Yes, studiestoday provides NCERT solutions for Chapter 5 Operators in Python Class 11 Computer Science in mobile-friendly format and can be accessed on smartphones and tablets.
Yes, NCERT solutions for Class 11 Chapter 5 Operators in Python Computer Science are available in multiple languages, including English, Hindi
All questions given in the end of the chapter Chapter 5 Operators in Python have been answered by our teachers
NCERT solutions for Computer Science Class 11 can help you to build a strong foundation, also access free study material for Class 11 provided on our website.
Carefully read the solutions for Class 11 Computer Science, understand the concept and the steps involved in each solution and then practice more by using other questions and solutions provided by us