8000 Merge branch 'master' of https://github.com/tecladocode/complete-pyth… · VixyMan/complete-python-course@ee17dda · GitHub
[go: up one dir, main page]

Skip to content

Commit ee17dda

Browse files
committed
Merge branch 'master' of https://github.com/tecladocode/complete-python-course into pdf-section-1
2 parents 543c1c7 + 86418b7 commit ee17dda

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
rebrand-subs/
2+
subs/
3+
promo/
4+
cpc-questions/
25
captions/
36
page_*.jpeg
47
exercises/
@@ -24,3 +27,7 @@ exports/
2427
videos/
2528
*.numbers
2629
*.sketch
30+
*.pptx
31+
*.vtt
32+
*.zip
33+
**/old

course_contents/19_gui_development_tkinter/lectures/17_adding_permanent_scrollbar/app.py

Lines changed: 8 additions & 3 deletions
< 8000 td data-grid-cell-id="diff-fb971cde950ec4b1c4476362bba3e1c1e539c606a7d42855ff56b0eeb74db89e-25-26-2" data-line-anchor="diff-fb971cde950ec4b1c4476362bba3e1c1e539c606a7d42855ff56b0eeb74db89eR26" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">+
def get_current_tab():
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,26 @@ def check_for_changes():
1717

1818

1919
def get_text_widget():
20-
current_tab = notebook.nametowidget(notebook.select())
20+
current_tab = get_current_tab()
2121
text_widget = current_tab.winfo_children()[0]
2222

2323
return text_widget
2424

2525

26
27+
return notebook.nametowidget(notebook.select())
28+
29+
2630
def close_current_tab():
27-
current = get_text_widget()
2831
if current_tab_unsaved() and not confirm_close():
2932
return
33+
34+
current_tab = get_current_tab()
3035

3136
if len(notebook.tabs()) == 1:
3237
create_file()
3338

34-
notebook.forget(current)
39+
notebook.forget(current_tab)
3540

3641

3742
def current_tab_unsaved():

course_contents/1_intro/lectures/5_remainder/code.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line ch 8000 ange
@@ -1,11 +1,11 @@
1-
division_with_remainder = 12 // 5 # should be 2.4
2-
print(division_with_remainder) # prints 2
1+
integer_division = 13 // 5 # should be 2.6
2+
print(integer_division) # prints 2
33

4-
# 5 goes into 12 two times. (5 * 2 is 10). The remainder is 2.
4+
# 5 goes into 13 two times. (5 * 2 is 10). The remainder is 3.
55
# Getting the remainder of a division is such a popular operation, that Python gives us a way to do it really easily.
66

7-
remainder = 12 % 5
8-
print(remainder) # prints 2
7+
remainder = 13 % 5
8+
print(remainder) # prints 3
99

1010
# Why is it so popular?
1111
# What would the remainder be in these divisions?
Binary file not shown.
Binary file not shown.
< 32B5 /div>

0 commit comments

Comments
 (0)
0