JavaScript Numbers for Pythonistas Quiz

Interactive Quiz ⋅ 8 Questions
By Stephen Gruppetta

In this quiz, you’ll test your understanding of JavaScript Numbers for Pythonistas.

By working through this quiz, you’ll revisit what JavaScript does when you divide by zero, how to port //, %, **, and the math module, how Math.round() and .toFixed() treat exact halves, and why Number(), parseInt(), and Math.trunc() aren’t three spellings of Python’s int().

Most questions show a short snippet ported from Python and ask what it does in JavaScript, or which version gives the same answer as the Python script. Good luck!

The quiz contains 8 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!

Related Resources