Found this content helpful? Log in or sign up to leave a like!
I need an algorithm for rounding whole numbers in a quiz. Is that possible to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need an algorithm for rounding whole numbers in a quiz. Is that possible to do? For example, the number is 405 and I want the student to round to the nearest hundred.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, there is a helper function in formula which is "round", which should give you what you want. To round to the nearest 100, divide by 100, round and then multiply by 100: 100*round(x/100). Please test to see if it works as you expect, as I haven't used them before (especially for negative numbers, if you're using those).
For a list of helper functions, check Canvas Formula Quiz Question Helper Functions - Instructure Community - 387062.
Used in a formula question, that allows you to give them a number, say 405, and ask them to round them:
405/100=4.05
round(4.05)=4
100*4=400
Classic Quizzes formula questions: How do I create a Formula quiz question with a sin... - Instructure Community - 920
New Quizzes formula question: How do I create a Formula question in New Quizzes? - Instructure Community - 956