pyupgrade --py37-plus **/*.py (#1654)

* pyupgrade --py37-plus **/*.py

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2020-01-03 15:25:36 +01:00
committed by John Law
parent 34c808b375
commit 28419cf839
77 changed files with 71 additions and 128 deletions

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Problem:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Problem:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Problem:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Problem:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
By listing the first six prime numbers:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
By listing the first six prime numbers:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
By listing the first six prime numbers:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The four adjacent digits in the 1000-digit number that have the greatest
product are 9 × 9 × 8 × 9 = 5832.

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The four adjacent digits in the 1000-digit number that have the greatest
product are 9 × 9 × 8 × 9 = 5832.

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The four adjacent digits in the 1000-digit number that have the greatest
product are 9 × 9 × 8 × 9 = 5832.

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Problem Statement:
The following iterative sequence is defined for the set of positive integers:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Collatz conjecture: start with any positive integer n. Next term obtained from
the previous term as follows:

View File

@ -1,4 +1,3 @@
# -.- coding: latin-1 -.-
from math import sqrt
"""

View File

@ -1,4 +1,3 @@
# -*- coding: latin-1 -*-
"""
Name scores
Problem 22

View File

@ -1,4 +1,3 @@
# -*- coding: latin-1 -*-
"""
Name scores
Problem 22

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The Fibonacci sequence is defined by the recurrence relation:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The Fibonacci sequence is defined by the recurrence relation:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
The Fibonacci sequence is defined by the recurrence relation:

View File

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
Coin sums
Problem 31

View File

@ -46,13 +46,11 @@ def solution():
"""
return sum(
set(
[
int("".join(pandigital[5:9]))
for pandigital in itertools.permutations("123456789")
if isCombinationValid(pandigital)
]
)
{
int("".join(pandigital[5:9]))
for pandigital in itertools.permutations("123456789")
if isCombinationValid(pandigital)
}
)

View File

@ -1 +0,0 @@

View File

@ -43,7 +43,7 @@ def solve(digit_len: int) -> str:
while den <= 99:
if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
if isDigitCancelling(num, den):
solutions.append("{}/{}".format(num, den))
solutions.append(f"{num}/{den}")
den += 1
num += 1
den = 10

View File

@ -1,4 +1,3 @@
# -.- coding: latin-1 -.-
"""
Champernowne's constant
Problem 40

View File

@ -1,4 +1,3 @@
# -.- coding: latin-1 -.-
"""
Combinatoric selections
Problem 53