diff options
Diffstat (limited to 'python/problems/introduction/fahrenheit_to_celsius')
-rw-r--r-- | python/problems/introduction/fahrenheit_to_celsius/common.py | 3 | ||||
-rw-r--r-- | python/problems/introduction/fahrenheit_to_celsius/sl.py | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/python/problems/introduction/fahrenheit_to_celsius/common.py b/python/problems/introduction/fahrenheit_to_celsius/common.py index df426d3..6549c32 100644 --- a/python/problems/introduction/fahrenheit_to_celsius/common.py +++ b/python/problems/introduction/fahrenheit_to_celsius/common.py @@ -22,6 +22,7 @@ hint_type = { 'name_error': Hint('name_error'), 'unsupported_operand': Hint('unsupported_operand'), 'not_callable': Hint('not_callable'), + 'final_hint': Hint('final_hint'), } def test(python, code): @@ -58,6 +59,8 @@ def test(python, code): hints = [{'id': 'test_results', 'args': {'passed': n_correct, 'total': len(test_in)}}] if tin: hints.append({'id': 'problematic_test_case', 'args': {'testin': str(tin), 'testout': str(tout)}}) + if passed: + hints.append({'id': 'final_hint'}) return passed, hints def hint(python, code): diff --git a/python/problems/introduction/fahrenheit_to_celsius/sl.py b/python/problems/introduction/fahrenheit_to_celsius/sl.py index f8ca977..b61c436 100644 --- a/python/problems/introduction/fahrenheit_to_celsius/sl.py +++ b/python/problems/introduction/fahrenheit_to_celsius/sl.py @@ -57,8 +57,8 @@ plan = ['''\ <li>Izpis temperature v Celzijih (izpiši C).</li> </ol>''', no_input_call, - - + expressions_python, + printing ] hint = { @@ -121,4 +121,10 @@ C = 5/9 * (F – 32). </pre> <p>Python ne zna izpuščati znaka za množenje, kot to delamo pri matematiki.</p>''' ], + + 'final_hint' : [ + '''\ +<p>Odlično, program deluje! <br> +Pri tej nalogi si se naučil a) uporabljati funkcijo <code>input</code>, +b) kako spremeniti niz v število, c) računanja v Pythonu in d) izpisati rezultat!</p>'''] } |