Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding issue in Print Score function #107

Open
lucyturn3r opened this issue Oct 23, 2019 · 1 comment
Open

Rounding issue in Print Score function #107

lucyturn3r opened this issue Oct 23, 2019 · 1 comment
Labels
bug Something isn't working questions Related to CodeWOF questions

Comments

@lucyturn3r
Copy link
Contributor

If the user submits this code as their answer:

def print_score(points, total_possible):
    print(str(points / total_possible * 100) + '%')

It contains the correct amount of decimal places in the answer. However, if they submit this code:

def print_score(points, total_possible):
    print("{}%".format(points / total_possible * 100))

Then it is marked as incorrect. When the two answers are run in a normal IDE, both are marked as correct. I assume that this rounding problem is to do with Skulpt, which would mean that this question should be removed, or modified.
image

@eAlasdair eAlasdair added bug Something isn't working questions Related to CodeWOF questions labels Jun 17, 2020
@JackMorganNZ
Copy link
Member

This will be solved when we switch to using Jobe in a Box, similar to our CS Unplugged system. This is because we will be running programs in Python 3, instead of a JavaScript interpretation of Python 3 (Skulpt).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working questions Related to CodeWOF questions
Development

No branches or pull requests

3 participants