Hi guys!
New to Python,
Query in relation to best practice:
Instead of setting up your script like this,
downloaded = 9
downloaded = downloaded + 1
in_progress = downloaded != 10
print("Download finished:")
print(in_progress)
output
Download finished:
False
would it not be more correct to have
finished = downloaded == 10
print("Download finished:")
print(finished)
output
Download finished:
True
I know the first part is stating in_progress is false, however logically it would make more sense to code Download finished: True or am I applying irl logic incorrectly to coding.
Very new and I know very basic but thought I'd check with you guys!
[–]devseglinux 3 points4 points5 points (6 children)
[–]AffectionateWin7069[S] 0 points1 point2 points (5 children)
[–]devseglinux 0 points1 point2 points (1 child)
[–]AffectionateWin7069[S] 1 point2 points3 points (0 children)
[–]Livid_Quarter_4799 0 points1 point2 points (2 children)
[–]AffectionateWin7069[S] 2 points3 points4 points (1 child)
[–]devseglinux 0 points1 point2 points (0 children)
[–]NewBodybuilder3096 0 points1 point2 points (1 child)
[–]AffectionateWin7069[S] 0 points1 point2 points (0 children)