8 kyu

Fix the Bugs (Syntax) - My First Kata

3,633 of 10,769donaldsebleung

Description:

Fix the Bugs (Syntax) - My First Kata

Overview

Hello, this is my first Kata so forgive me if it is of poor quality.

In this Kata you should fix/create a program that returns the following values:

  • false/False if either a or b (or both) are not numbers
  • a % b plus b % a if both arguments are numbers

You may assume the following:

  1. If a and b are both numbers, neither of a or b will be 0.

Language-Specific Instructions

Javascript and PHP

In this Kata you should try to fix all the syntax errors found in the code.

Once you think all the bugs are fixed run the code to see if it works. A correct solution should return the values specified in the overview.

Extension: Once you have fixed all the syntax errors present in the code (basic requirement), you may attempt to optimise the code or try a different approach by coding it from scratch.

Debugging

Stats:

CreatedFeb 1, 2016
PublishedFeb 1, 2016
Warriors Trained14252
Total Skips154
Total Code Submissions38301
Total Times Completed10769
JavaScript Completions6027
Ruby Completions626
Python Completions3633
PHP Completions806
CoffeeScript Completions25
Total Stars76
% of votes with a positive feedback rating89% of 1836
Total "Very Satisfied" Votes1504
Total "Somewhat Satisfied" Votes263
Total "Not Satisfied" Votes69
Ad
Contributors
  • donaldsebleung Avatar
  • Javatlacati Avatar
  • joh_pot Avatar
  • GiacomoSorbi Avatar
  • FArekkusu Avatar
  • Just4FunCoder Avatar
  • KayleighWasTaken Avatar
Ad