Skip to content

Commit 6264d0f

Browse files
committed
Fix indentation
1 parent ea8dc3a commit 6264d0f

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

pretext/Introduction/ObjectOrientedProgramminginPythonDefiningClasses.ptx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ TypeError: unsupported operand type(s) for +: 'Fraction' and 'Fraction'</pre>
240240
<program interactive="activecode" language="python">
241241
<input>
242242
def gcd(m, n):
243-
while m % n != 0:
244-
m, n = n, m % n
243+
while m % n != 0:
244+
m, n = n, m % n
245245
return n
246246

247247
print(gcd(20, 10))
@@ -260,11 +260,10 @@ TypeError: unsupported operand type(s) for +: 'Fraction' and 'Fraction'</pre>
260260
<program language="python">
261261
<input>
262262
def __add__(self, other_fraction):
263-
new_num = self.num * other_fraction.den + \
264-
self.den * other_fraction.num
265-
new_den = self.den * other_fraction.den
266-
common = gcd(new_num, new_den)
267-
return Fraction(new_num // common, new_den // common)
263+
new_num = self.num * other_fraction.den + self.den * other_fraction.num
264+
new_den = self.den * other_fraction.den
265+
common = gcd(new_num, new_den)
266+
return Fraction(new_num // common, new_den // common)
268267
</input>
269268
</program>
270269
</listing>

publication/publication-academy.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</source>
77
<html>
88
<platform host="runestone" />
9-
<knowl exercise-inline="no" example="no" listing="yes" />
9+
<knowl exercise-inline="no" example="no" listing="no" />
1010
<css style="oscarlevin" colors="blue_red" toc="crc" banner="crc" navbar="crc" shell="crc"/>
1111
</html>
1212
</publication>

publication/publication.ptx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</source>
77
<html>
88
<platform host="web" />
9-
<knowl exercise-inline="no" example="no" listing="yes" />
9+
<knowl exercise-inline="no" example="no" listing="no" />
1010
<css style="oscarlevin" colors="blue_red" toc="crc" banner="crc" navbar="crc" shell="crc"/>
1111
</html>
1212
</publication>

0 commit comments

Comments
 (0)