๐งฎ Scientific Calculator using Python's library Tkinter ๐งฎ
๐ Explanation of Each Button and Corresponding Function ๐
1st Row ๐
- abs ๐ : The absolute value of a number (e.g.,
abs(-5) = 5
). - mod ๐ : From modulo, the operation to find the remainder of the division of one number by another.
In Python, we use the symbol%
(e.g.,5 % 2 = 1
). - div โ๏ธ : Floor division returns the result of the division rounded down to the nearest integer.
In Python, we use the symbol//
(e.g.,8 // 3 = 2
). - x! ๐ : The factorial of the number x (e.g.,
4! = 24
). - e โฎ๏ธ : Euler's number, a mathematical constant approximately equal to 2.71828.
2nd Row ๐
- sin ๐ : Sine of an angle ฮธ in degrees (e.g.,
sin(90) = 1
). - cos ๐ : Cosine of an angle ฮธ in degrees (e.g.,
cos(180) = -1
). - tan ๐ : Tangent of an angle ฮธ in degrees (e.g.,
tan(45) = 1
). - cot ๐ : Cotangent of an angle ฮธ in degrees (e.g.,
cot(45) = 1 / tan(45) = 1
). - ฯ โผ๏ธ : Archimedes' constant defined as the ratio of a circle's circumference to its diameter, approximately equal to 3.14159.
3rd Row ๐
- xยฒ โซ๏ธ : x raised to the power of 2 (e.g.,
4ยฒ = 16
). - xยณ โซ๏ธ : x raised to the power of 3 (e.g.,
5ยณ = 125
). - xโฟ โซ๏ธ : x raised to any power (e.g.,
2โด = 16
). - xโปยน โซ๏ธ : x raised to the power of (-1), the inverse of number x (e.g.,
2โปยน = 0.5
). - 10หฃ โซ๏ธ : Powers of 10 (e.g.,
10ยณ = 1000
).
4th Row ๐
- ยฒโ โ๏ธ : Square root of a number (e.g.,
ยฒโ144 = 12
). - ยณโ โ๏ธ : Cube root of a number (e.g.,
ยณโ8 = 2
). - โ โ๏ธ : Any root of a number (e.g.,
โดโ16 = 2
). - logโโ ๐ : The logarithm of a number with base 10 (e.g.,
logโโ(1000) = 3
). - ln ๐ : The logarithm of a number with base e (e.g.,
logโ(e) = ln(e) = 1
).
5th Row ๐
- ( ๐ : Left parenthesis.
- ) ๐ : Right parenthesis.
- ยฑ ๐ : Change the sign of a number.
- % ๐ : Find the percentage of a number (e.g.,
5% = 0.05
). - eหฃ ๐ : Exponential function (e.g.,
eยฒ โ 7.389
).
6th, 7th, 8th, 9th Row ๐
In these rows are:
- The basic number buttons (0 to 9).
- The basic math symbols (operators) (+, -, *, /).
- The equal sign (=) and decimal point (.).
- Button DEL ๐๏ธ to delete one or more characters from the end of the entry.
- Button AC ๐๏ธ to delete the whole entry.
- EXP ๐ : Multiply any number with powers of 10 (e.g.,
2 * 10ยณ = 2000
).
๐ก Feel free to suggest any new emojis or changes to make it more attractive and user-friendly! ๐ก