GithubHelp home page GithubHelp logo

adam777z / freecodecamp-project-metric-imperial-converter-php Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 39 KB

freeCodeCamp: Information Security and Quality Assurance Projects: Metric-Imperial Converter (https://github.com/Adam777Z/freecodecamp-project-metric-imperial-converter)

Home Page: https://adam777.x10.mx/freecodecamp-project/metric-imperial-converter/

CSS 0.43% JavaScript 6.86% PHP 92.71%

freecodecamp-project-metric-imperial-converter-php's Introduction

freeCodeCamp - Information Security and Quality Assurance Project

Metric-Imperial Converter

User Stories:

  1. I can GET /api/convert with a single parameter containing an accepted number and unit and have it converted.
    Hint: Split the input by looking for the index of the first character which will mark the start of the unit.
  2. I can convert 'gal' to 'L' and vice versa. (1 gal to 3.78541 L)
  3. I can convert 'lbs' to 'kg' and vice versa. (1 lbs to 0.45359 kg)
  4. I can convert 'mi' to 'km' and vice versa. (1 mi to 1.60934 km)
  5. If my number is invalid, returned will be 'invalid number'.
  6. If my unit of measurement is invalid, returned will be 'invalid unit'.
  7. If both are invalid, returned will be 'invalid number and unit'.
  8. I can use fractions, decimals or both in my parameter (for example: 5, 1/2, 2.5/6), but if nothing is provided it will default to 1 (initial number).
  9. Returned will consist of the initNum, initUnit, returnNum, returnUnit, and string spelling out units in format {initNum} {initUnit} converts to {returnNum} {returnUnit} with the result rounded to 5 decimals.
  10. All 21 tests are complete and passing.

freecodecamp-project-metric-imperial-converter-php's People

Contributors

adam777z avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.