This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Functions, Part I Forum

View Course » View Exercise

418 points
5148908c7f8a2a4154000116_990145636
Submitted by
Deepesh210
about 4 years ago

WHATS WRONG IN THIS?

<html>
    <p>
    <?php
    // Try rounding a floating point number to an integer
    // and print it to the screen

    ?>
    </p>
    <p>
    <?php
    // Try rounding a floating point number to 3 decimal places
    // and print it to the screen
    $r=round(M_PI);
    print $r;
    ?>
    </p>
    <p>
    <?php
    $rd=round(M_PI,3);
    print $rd;

    ?>
</html>

The Error says:-Your first call to round() should print an integer

Alex J edited this post to fix code formatting


1 vote

permalink

The problem is that the submission correctness test checks the content of your <p> elements, and expects the very first one to be a single-digit number. But your first paragraph doesn't have any text at all, because all you have in there is PHP comments.

3117 points
Picture
Submitted by
Alex J
about 4 years ago

1 Comment

5148908c7f8a2a4154000116_990145636 Deepesh210 about 4 years ago

Thanx