English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write short notes on the Arithmetic operator with examples. - Computer Science

Advertisements
Advertisements

Question

Write short notes on the Arithmetic operator with examples.

Answer in Brief

Solution

  • An arithmetic operator is a mathematical operator that takes two operands and performs a calculation on them.
  • They are used for simple arithmetic.
  • Most computer languages contain a set of such operators that can be used within equations to perform different types of sequential calculations.
  • Python supports the following Arithmetic operators.
Operator-Operation Examples Result
Assume a=100 and b=10 Evaluate the following expressions
+ (Addition) > > > a+b 110
– (Subtraction) > > > a-b 90
* (Multiplication) > > > a*b 1000
/ (Division) > > > a/b 10.0
% (Modulus) > > > a% 30 10
** (Exponent) > > > a**2 10000
/ / (Floor Division) > > > a// 30 (Integer Division) 3
shaalaa.com
Tokens
  Is there an error in this question or solution?
Chapter 5: Python - Variables and Operators - Evaluation [Page 66]

APPEARS IN

Samacheer Kalvi Computer Science [English] Class 12 TN Board
Chapter 5 Python - Variables and Operators
Evaluation | Q 1. | Page 66
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×