Научный калькулятор

Продвинутый калькулятор с тригонометрией, логарифмами, степенями и другими функциями.

Угол
0

Часто задаваемые вопросы

Реализация кода

import math

# Trigonometric functions (radians by default)
angle_deg = 45
angle_rad = math.radians(angle_deg)

print(math.sin(angle_rad))   # 0.7071...
print(math.cos(angle_rad))   # 0.7071...
print(math.tan(angle_rad))   # 1.0

# Inverse trig
print(math.degrees(math.asin(0.5)))  # 30.0

# Logarithms
print(math.log10(1000))  # 3.0
print(math.log(math.e))  # 1.0 (natural log)
print(math.log(8, 2))    # 3.0 (log base 2)

# Power and roots
print(math.pow(2, 10))   # 1024.0
print(math.sqrt(144))    # 12.0

# Factorial
print(math.factorial(5)) # 120

# Constants
print(math.pi)  # 3.14159...
print(math.e)   # 2.71828...

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.