Skip to content

Commit bf38c4f

Browse files
committed
PythonPracticeProblems fixing flake8 issues
1 parent 938eb90 commit bf38c4f

File tree

4 files changed

+38
-25
lines changed

4 files changed

+38
-25
lines changed

python-practice-problems/caesar.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
whitespace and punctuation.
2020
"""
2121
import unittest
22-
import string
2322

2423

2524
def caesar(plain_text, shift_num=1):

python-practice-problems/integersums.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
""" Sum of Integers Up To n
3-
Write a function, add_it_up, which returns the sum of the integers from 0 to
4-
the single integer input parameter.
3+
Write a function, add_it_up, which returns the sum of the integers from 0
4+
to the single integer input parameter.
55
66
The function should return 0 if a non-integer is passed in.
77
"""

python-practice-problems/logparse.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,11 @@
77
The device state message has many possible values, but this program only
88
cares about three: ON, OFF, and ERR.
99
10-
Your program will parse the given log file and print out a report giving how
11-
long the device was ON, and the time stamp of any ERR conditions.
10+
Your program will parse the given log file and print out a report giving
11+
how long the device was ON, and the time stamp of any ERR conditions.
1212
"""
13-
import sys
14-
import time
1513

1614

1715
if __name__ == "__main__":
1816
# TODO: Your code goes here
1917
print("There are no unit tests for logparse.")
20-

python-practice-problems/sudokusolve.py

+34-17
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,42 @@ def sudoku_solve(input_string):
5050

5151
class SudokuSolverTestCase(unittest.TestCase):
5252
problems = [
53-
"004006079000000602056092300078061030509000406020540890007410920105000000840600100",
54-
"016400000200009000400000062070230100100000003003087040960000005000800007000006820",
55-
"049008605003007000000000030000400800060815020001009000010000000000600400804500390",
56-
"760500000000060008000000403200400800080000030005001007809000000600010000000003041",
57-
"000605000003020800045090270500000001062000540400000007098060450006040700000203000",
58-
"409000705000010000006207800200000009003704200800000004002801500000060000905000406",
59-
"000010030040070501002008006680000003000302000300000045200500800801040020090020000",
60-
"080070030260050018000000400000602000390010086000709000004000800810040052050090070",
61-
"000093006000800900020006100000080053006000200370050000002500040001009000700130007",
53+
"00400607900000060205609230007806103050900040602054089000741092010500"
54+
"0000840600100",
55+
"01640000020000900040000006207023010010000000300308704096000000500080"
56+
"0007000006820",
57+
"04900860500300700000000003000040080006081502000100900001000000000060"
58+
"0400804500390",
59+
"76050000000006000800000040320040080008000003000500100780900000060001"
60+
"0000000003041",
61+
"00060500000302080004509027050000000106200054040000000709806045000604"
62+
"0700000203000",
63+
"40900070500001000000620780020000000900370420080000000400280150000006"
64+
"0000905000406",
65+
"00001003004007050100200800668000000300030200030000004520050080080104"
66+
"0020090020000",
67+
"08007003026005001800000040000060200039001008600070900000400080081004"
68+
"0052050090070",
69+
"00009300600080090002000610000008005300600020037005000000250004000100"
70+
"9000700130007",
6271
]
6372
expected = [
64-
"284136579913754682756892341478961235539287416621543897367415928195328764842679153",
65-
"316452978285679314497318562879234156142965783653187249968721435521843697734596821",
66-
"149238675623957148758146239935472861467815923281369754316794582592683417874521396",
67-
"763548129421369758958172463297436815186795234345821697819254376634917582572683941",
68-
"829675314673124895145398276587436921962817543431952687398761452216549738754283169",
69-
"419638725728519643536247891254186379193754268867923154642891537371465982985372416",
70-
"768915432943276581512438796685194273174352968329687145237569814851743629496821357",
71-
"481976235267453918935821467178632549392514786546789321724165893819347652653298174",
73+
"28413657991375468275689234147896123553928741662154389736741592819532"
74+
"8764842679153",
75+
"31645297828567931449731856287923415614296578365318724996872143552184"
76+
"3697734596821",
77+
"14923867562395714875814623993547286146781592328136975431679458259268"
78+
"3417874521396",
79+
"76354812942136975895817246329743681518679523434582169781925437663491"
80+
"7582572683941",
81+
"82967531467312489514539827658743692196281754343195268739876145221654"
82+
"9738754283169",
83+
"41963872572851964353624789125418637919375426886792315464289153737146"
84+
"5982985372416",
85+
"76891543294327658151243879668519427317435296832968714523756981485174"
86+
"3629496821357",
87+
"48197623526745391893582146717863254939251478654678932172416589381934"
88+
"7652653298174",
7289
"Unsolvable",
7390
]
7491

0 commit comments

Comments
 (0)