Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #342842 Score: 0
    Profile photo of Christina Metzler
    Christina Metzler
    Member
    beginner
    intermediate
    contributor
    curious george
    friend finder
    wise owl
    profile
    Group Member
    1 pt
    @cmetzler2560

    Hello,

    Is there code I need to add to the Calculate Score action to get a whole number instead of a decimal?
    This particular exam has 12 questions; I have the final score variable set to multiply by 100, and then a final score variable to divide by 12.

    #342972 Score: 1
    Profile photo of Wendy Miller
    Wendy Miller
    Moderator
    beginner
    intermediate
    contributor
    advanced
    friend finder
    junior moderator
    wise owl
    profile
    verified member
    51 pts
    @wendymiller

    Hi Christina,

    There are two rounding methods you can use to get a non-decimal value, Round Variable which rounds to the nearest whole number up or down, and Round Down Variable, which always rounds down to the next lowest whole number. So after you’ve divided by 12, add another action that rounds the same variable using one of those two methods. See attached screen capture for where to find them.

     

    This post has received 1 vote up.
    Attachments:
    #346043 Score: 0
    Profile photo of Christina Metzler
    Christina Metzler
    Member
    beginner
    intermediate
    contributor
    curious george
    friend finder
    wise owl
    profile
    Group Member
    1 pt
    @cmetzler2560

    Wendy,

    Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.