Skip to content

Commit

Permalink
Merge pull request #29 from open-resources/sigfig_warning
Browse files Browse the repository at this point in the history
Fix the if/elif/else statement so it works correctly
  • Loading branch information
firasm authored Oct 2, 2023
2 parents 7b2e93b + 1355d4f commit 3ce9cd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/problem_bank_helpers/problem_bank_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ce9cd9

Please sign in to comment.