Skip to content

Commit 9750982

Browse files
committed
adjusted comments
1 parent 797d39e commit 9750982

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/julia.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def julia(z: Complex, c: Complex) -> Complex:
1313
square = z.multiply(z)
1414
return square.add(c)
1515

16+
# the initial complex number - feel free to play with it!
1617
c = Complex(-0.07, 0.652)
1718

1819
mesh = []
@@ -33,4 +34,3 @@ def julia(z: Complex, c: Complex) -> Complex:
3334
scaled = [[log10(val + 1e-12) for val in row] for row in mesh]
3435

3536
# TODO: use plt.imshow and plt.show to explore the scaled values.
36-
# TODO: combine plt.imshow and plt.colorbar.

src/my_code.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def my_function() -> bool:
1010
Returns:
1111
bool: Hardcoded to True.
1212
"""
13-
1413
return True
1514

1615

@@ -27,10 +26,12 @@ def __init__(self, realpart: float, imagpart: float):
2726
# TODO: Implement me.
2827

2928
def add(self, other: Complex) -> Complex:
30-
"""Add to complex numbers.
29+
"""Add to complex number.
3130
3231
For two complex numbers x_1 + iy_1, x_2 + iy_2,
3332
compute (x_1 + iy_1) + (x_2 + iy_2) = x_1 + x_2 + i(y_1 + y_2).
33+
So the sum of two complex numbers is again a complex number, whose real part is the sum of the real parts
34+
and the imaginary part is the sum of the imaginary parts of the two complex numbers.
3435
3536
Args:
3637
other (Complex): The number to add to self.

0 commit comments

Comments
 (0)