Skip to content

Commit 8691402

Browse files
committed
minor code improvements for chapter 3 intro code.
1 parent 36d1c80 commit 8691402

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/py/ch03_lang/L06_ternary.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ def main():
88
num = int(text)
99
num_class = "small" if num < 100 else "huge!"
1010
print(f"The number is {num_class}")
11+
12+
13+
if __name__ == '__main__':
14+
main()

apps/py/ch03_lang/L10_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def main():
99
print(Fore.YELLOW + f"Calling sketchy_method with {v}...", flush=True)
1010
sketchy_method(v)
1111
except BrokenPipeError:
12-
print(Fore.LIGHTRED_EX + f" **** Network error, check our wifi.")
12+
print(Fore.LIGHTRED_EX + " **** Network error, check our wifi.")
1313
except ArithmeticError:
1414
print(Fore.LIGHTRED_EX + f" **** Cannot compute with {v}!")
1515
except Exception as e:

0 commit comments

Comments
 (0)