When completing your code challenges keep in mind the four characteristics of quality code…
- Functional – Accomplishes it’s task every time.
- Readable – Easy for a human to read and edit
- Efficient – Executes quickly without unnecessary steps.
- Short – Uses the fewest lines of code.
Or put another way…
- Does it work? Your code should meet all of the requirements and work in every situation.
- Is it understandable? Your code should be easy for a human to read and understand.
- Is it fast? You code should execute and finish as quickly as possible.
- Is it short? Your code should be as few line of code as possible.
Submit Your Programming Challenges here. Please make sure your challenge meets all of the requirements before submitting. Also please make sure your app is titled “Programming Challenge #__” to make it extra clear which challenge you have completed.
- Four Function Calculator App – Create a basic four function calculator. Remix this template to start. Watch a video example to see how it should work here.
- Four Function Calculator App (Final Draft) – Fine tune your calculator to handle these weird errors and other small things…
- What if the user puts a non-number into one of the boxes?
- Print “Error: Please only enter numbers”
- Do not allow users to edit the big output text area
- What if they divide by zero?
- Print “Error: Cannot divide by zero”
- What if the output is scientific notation
- If the output is scientific notation, then print “Error: Answer is too long”
- What if the user puts a non-number into one of the boxes?
- Robot Maze Challenge
- getSquarePerimeter(area) – Given the area of a square return the perimeter of the square.
- Write a function getSmallestNumber(n1,n2,n3,n4) that returns a numeric value that represents the smallest number given four numbers. Please do not use the built in Math.min function
- Fix the code to make a “Match Object to Color” app. Remix template here.