From 5a1b4202dfa99bb88fab6b1f23594bd2def811c6 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Oct 2015 17:58:54 +0200 Subject: Changes some text descriptions and added a final hint to Fahrenheit. --- python/problems/introduction/fahrenheit_to_celsius/common.py | 3 +++ python/problems/introduction/fahrenheit_to_celsius/sl.py | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'python/problems/introduction/fahrenheit_to_celsius') 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 = ['''\
  • Izpis temperature v Celzijih (izpiši C).
  • ''', no_input_call, - - + expressions_python, + printing ] hint = { @@ -121,4 +121,10 @@ C = 5/9 * (F – 32).

    Python ne zna izpuščati znaka za množenje, kot to delamo pri matematiki.

    ''' ], + + 'final_hint' : [ + '''\ +

    Odlično, program deluje!
    +Pri tej nalogi si se naučil a) uporabljati funkcijo input, +b) kako spremeniti niz v število, c) računanja v Pythonu in d) izpisati rezultat!

    '''] } -- cgit v1.2.1