From 1355d4ff4d8111abe0b633c0dd21f878026dbe9a Mon Sep 17 00:00:00 2001 From: Firas Moosvi Date: Mon, 2 Oct 2023 11:42:32 -0700 Subject: [PATCH] Fix the if/elif/else statement so it works correctly --- src/problem_bank_helpers/problem_bank_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/problem_bank_helpers/problem_bank_helpers.py b/src/problem_bank_helpers/problem_bank_helpers.py index af44fe2..a0c9457 100644 --- a/src/problem_bank_helpers/problem_bank_helpers.py +++ b/src/problem_bank_helpers/problem_bank_helpers.py @@ -185,9 +185,9 @@ def roundp(*args,**kwargs): num_str = str(float(a[0])) # Create default sigfigs if necessary - if kw.get('sigfigs',None): + if kw.get('sigfigs',None) != None: z = kw['sigfigs'] - elif kw.get('decimals', None): + elif kw.get('decimals', None) != None: z = kw['decimals'] else: z = 3 # Default sig figs