This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 1. variables: | |
| * x_is_odd | |
| * odd_or_not | |
| * x | |
| * | |
| * 2. inputs: | |
| * the integer x | |
| * | |
| * 3. determine whether or not the integer x is odd or even |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Homework.java | |
| * | |
| * Version: 1.0 | |
| * | |
| * 1: Take an integer input from the user. | |
| * Value of x | |
| * 2: Determine if the number is even or odd. | |
| * Value of x_is_odd | |
| * 3: Display the number and whether it is even or odd to the user. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Display the console graph using a log scale, so elements don't blow out with huge set values | |
| var _BarGraphicCache = ''; | |
| var generateBar = function(pValue, pAmount, pMax, pWidth) | |
| { | |
| var tmpBarRenderAmount = pAmount; | |
| if (pMax > pWidth) | |
| { | |
| tmpBarRenderAmount = Math.log(pAmount) / (Math.log(pMax) / pWidth); | |
| } |