reginafeles commited on
Commit
a15d712
·
verified ·
1 Parent(s): 46e21a6

Update generators/classic/defective.py

Browse files
Files changed (1) hide show
  1. generators/classic/defective.py +1 -1
generators/classic/defective.py CHANGED
@@ -43,7 +43,7 @@ class DefectiveItemsGenerator(BaseTaskGenerator):
43
  favorable = total - defective
44
 
45
  answer_fraction = Fraction(favorable, total)
46
- answer = float(answer_fraction)
47
 
48
  steps = [
49
  f"1. Общее число изделий: {total}",
 
43
  favorable = total - defective
44
 
45
  answer_fraction = Fraction(favorable, total)
46
+ answer = round(float(answer_fraction), 2)
47
 
48
  steps = [
49
  f"1. Общее число изделий: {total}",