Skip to content

Week_02 - practice - rounding repeating digits #4

@memilanuk

Description

@memilanuk

Rounding problems involving repeating digits returns incorrect results.

First time through, I got this problem (and result):

11 x +  12  =  21
Round answer to two decimal places
x = 0.82
Try again
The correct answer is  0.8181818181818182

Second time through, I got this:

9 x +  11  =  6
Round answer to two decimal places
x = -0.56
Try again
The correct answer is  -0.5555555555555556 

Next run gave this:

9 x +  0  =  33
Round answer to two decimal places
x = 3.67
Try again
The correct answer is  3.6666666666666665 
 
11 x +  -3  =  31
Round answer to two decimal places
x = 3.09
Try again
The correct answer is  3.090909090909091 

In all examples, the supplied 'correct' answer is not rounded to two digits, which in turn marks the actual correct answer given as wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions