mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
Use ==/!= to compare str, bytes, and int literals (#767)
* Travis CI: Add more flake8 tests * Use ==/!= to compare str, bytes, and int literals ./project_euler/problem_17/sol1.py:25:7: F632 use ==/!= to compare str, bytes, and int literals if i%100 is not 0: ^ * Use ==/!= to compare str, bytes, and int literals * Update sol1.py
This commit is contained in:
@ -22,7 +22,7 @@ for i in range(1, 1001):
|
||||
if i >= 100:
|
||||
count += ones_counts[i/100] + 7 #add number of letters for "n hundred"
|
||||
|
||||
if i%100 is not 0:
|
||||
if i%100 != 0:
|
||||
count += 3 #add number of letters for "and" if number is not multiple of 100
|
||||
|
||||
if 0 < i%100 < 20:
|
||||
@ -32,4 +32,4 @@ for i in range(1, 1001):
|
||||
else:
|
||||
count += ones_counts[i/1000] + 8
|
||||
|
||||
print(count)
|
||||
print(count)
|
||||
|
Reference in New Issue
Block a user