JavaScript Numbers for Pythonistas (Fast Track) Quiz
Interactive Quiz ⋅ 9 Questions
By Stephen Gruppetta
In this quiz, you’ll test your understanding of JavaScript Numbers for Pythonistas (compact).
By working through this quiz, you’ll revisit what JavaScript does where Python would
stop with an error, how to port //, %, and divmod() so negative values still
match, how Math.round() and .toFixed() treat exact halves, how Number() and
parseInt() differ from int() and float(), and how to print formatted numbers.
Most questions show a short snippet ported from Python and ask what it prints in JavaScript, or which version gives the same answer as the Python script. Each one puts a Python habit in your way, so you can check that you’d now catch it. Good luck!
The quiz contains 9 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
Course
JavaScript Numbers for Pythonistas (Fast Track)
Port a coffee roastery's batch planner from Python to JavaScript in this faster version for experienced Python programmers, covering division, rounding, text input, and formatting.