The black formatter is no longer beta (#5960)

* The black formatter is no longer beta

* pre-commit autoupdate

* pre-commit autoupdate

* Remove project_euler/problem_145 which is killing our CI tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
Christian Clauss
2022-01-30 20:29:54 +01:00
committed by GitHub
co-authored by github-actions
parent c15a4d5af6
commit 24d3cf8244
81 changed files with 139 additions and 228 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ def solution(power: int = 1000) -> int:
>>> solution(15)
26
"""
num = 2 ** power
num = 2**power
string_num = str(num)
list_num = list(string_num)
sum_of_num = 0
@@ -31,6 +31,6 @@ def solution(power: int = 1000) -> int:
if __name__ == "__main__":
power = int(input("Enter the power of 2: ").strip())
print("2 ^ ", power, " = ", 2 ** power)
print("2 ^ ", power, " = ", 2**power)
result = solution(power)
print("Sum of the digits is: ", result)
+1 -1
View File
@@ -19,7 +19,7 @@ def solution(power: int = 1000) -> int:
>>> solution(15)
26
"""
n = 2 ** power
n = 2**power
r = 0
while n:
r, n = r + n % 10, n // 10