-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimeo.py
61 lines (52 loc) · 1 KB
/
timeo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import math
# FILEPATH: Untitled-1
# Addition
num1 = 10
num2 = 5
sum = num1 + num2
print("Sum:", sum)
# Subtraction
# Square root
num = 16
sqrt = math.sqrt(num)
print("Square root:", sqrt)
# Absolute value
num2 = -10
abs_val = abs(num2)
print("Absolute value:", abs_val)
# Round
num3 = 3.14159
rounded = round(num3, 2)
print("Rounded value:", rounded)
# Trigonometric functions
angle = math.pi / 4
sin_val = math.sin(angle)
cos_val = math.cos(angle)
tan_val = math.tan(angle)
print("Sine:", sin_val)
print("Cosine:", cos_val)
print("Tangent:", tan_val)
num3 = 8
num4 = 3
diff = num3 - num4
print("Difference:", diff)
# Multiplication
num5 = 4
num6 = 6
product = num5 * num6
print("Product:", product)
# Division
num7 = 15
num8 = 2
quotient = num7 / num8
print("Quotient:", quotient)
# Modulo
num9 = 17
num10 = 4
remainder = num9 % num10
print("Remainder:", remainder)
# Exponentiation
base = 2
exponent = 3
result = base ** exponent
print("Result:", result)