Arithmetic

74
1632 reads

February 15, 2013

Standard Operators & Assignments


THe rules for using operators are stated in the code-editor as comments. The resulting data-type is also stated.

46
1596 reads

February 15, 2013

Fibonacci Number


This example prints the nth Fibonacci number.

34
1502 reads

February 15, 2013

Binary operators & Implicit Conversions


This example shall be giving you thorough knowledge of the process of execution on arithmetic operators, how the data type are processed and how the arithmetic operations are performed.

82
1658 reads

February 15, 2013

Elementary Data Types for Arithmetic operations


Elementary data types for arithmetic operations are int & float.
Integers (= whole numbers) have no fractional part or decimal point. Floating point numbers have a decimal point or mantissa and

48
1645 reads

February 14, 2013

Prime Number


A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. For example, 5 is a prime number as it is only divisible by 1 and 5.

58
1640 reads

February 14, 2013

Armstrong Number


An Armstrong number is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3^3 + 7^3 + 1^3 = 371.

36
1563 reads

February 14, 2013

Palindrome Number


A palindromic number or numeral palindrome is a number that remains the same when its digits are reversed. Like 16461, for example, it is "symmetrical".

93
1266 reads

February 14, 2013

Using Arithmatic Operators


These example shows how to use arithmatic operators in math formulas.

256
2891 reads

February 14, 2013

Use of math module


Python provides many useful mathematical functions in math module.

203
1944 reads

February 14, 2013

Math Module


Python provides math module for more complicated mathematics.