Git Product home page Git Product logo

algorithms_spanishsentence's Introduction

ALGO-RITHMS CHALLENGE // Spanish Sentence Wannabe

1. Getting started

github.com/varnebla/mind-the-gap

Fork this repo and then git clone your forked repo to your computer. Once you're happy with your solution, git push and submit a pull request at github.com/your-github-name/your-repository.

2. Challenge

Background

In Spanish, sentences not only end with exclamation and question marks, but also begin with them (actually flipped over version).

It looks like: ¿Cómo estás? -> How are you? ¡Es maravilloso! -> It is wonderful!

Task

Keeping in mind the above-mentioned fact, your task is to find out how many sentences in unput array are spanish and spanish wannabes and return '¡(n) spanish sentence(s)!' If input is not an array you have to return 'Give me arrays only! Por favor!'

2.1. Examples

spanishSentence(['How are you?', '¿How are you?',  'It is you', '¡It is you', '¡You are awesome!']) // should return '¡2 spanish sentences here!'
spanishSentence(['How are you?', '¡Es maravilloso!',  'It is you', '¡Es maravilloso!', '¡You are awesome!']) // // should return '¡3 spanish sentences here!'
spanishSentence(undefined) //should 'Give me arrays only! Por favor!'

2.2. Testing your solution

To test your solution, run npm i in the root directory and then run npm t to run the automated tests.

2.3. Submitting your solution

To submit your solution:

  1. If you're working on a forked repo, push your changes to your forked repo and submit a pull request to this repo.

🤘🎉

algorithms_spanishsentence's People

Contributors

gmiliuta 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.