File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,24 @@ Hello world
29
29
from challenges import Challenge
30
30
31
31
class AddChallenge (Challenge ):
32
+
32
33
sample = '''
33
34
5, 6
34
35
'''
35
36
37
+ expect = '''
38
+ 11
39
+ '''
40
+
36
41
def build (self ):
37
42
self .model = self .line_to_integers(0 )
38
43
39
44
def calc (self ):
40
45
self .result = self .model[0 ] + self .model[1 ]
41
46
47
+ def format (self ):
48
+ self .output = str (self .result)
49
+
42
50
The class to write lets you focus on the core algorithms of the challenge while keeping stuff like opening, reading and
43
51
writing of files out of the way. You inherit several methods to set up the model or to format your result for writing.
44
52
@@ -309,10 +317,10 @@ alternatively as `stepik` or `rosalind`.
309
317
.. code-block :: bash
310
318
311
319
prompt> challenge --version
312
- challenge 0.6 .0
320
+ challenge 0.8 .0
313
321
314
322
prompt> stepik --version
315
- stepik 0.6 .0
323
+ stepik 0.8 .0
316
324
317
325
prompt> rosalind --version
318
- rosalind 0.6 .0
326
+ rosalind 0.8 .0
You can’t perform that action at this time.
0 commit comments