Skip to content

Commit d003a55

Browse files
committed
vector algorithm
1 parent e2084fa commit d003a55

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.idea/other.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
# Calculate BMI
1+
import numpy as np
22

3-
height = 1.8
4-
weight = 72
3+
vector1 = np.array([1, 2, 3])
4+
vector2 = np.array([4, 5, 6])
55

6-
bmi = weight / (height ** 2)
7-
print(bmi)
6+
# Vector addition
7+
print(vector1 + vector2)
8+
9+
# Vector multiplication
10+
print(vector1 * vector2)

0 commit comments

Comments
 (0)