Giter Site home page Giter Site logo

cheers_take3's Introduction

cheers_take3

The fully-tested interactive version of cheers, for cohort huckleberry

Specifications, for interactive version of cheers

Start the program by running ./cheers.rb

The program should ask:

Hello! What is your name?

The user types in their name, for example:

Abby

The program outputs a cheer in the following format:

Give me an... A

Give me a... B

Give me a... B

Give me a... Y

Abby’s just GRAND!

  • If there was no input, ask again ("I'm sorry, what was your name again?") until valid input is provided
  • Follow the proper grammatical for a and an. The rule is based on whether the spelling of a letter would begin with a vowel.
  • Skip non-word characters when printing the cheer (e.g. "Give me a..." lines)
  • Print the user's name out as it was originally input for the "just GRAND" line

After printing out the user's cheer, the program asks:

Hey, Abby, what's your birthday? (mm/dd)

The user types in their birthdate

08/25

  • If there was no input, asks again until valid input is provided
  • If there was input that couldn't be parsed, the program tries again, but with the prompt:

I couldn't understand that. Could you give that to me in mm/dd format?

The program then outputs the number of days until the user's birthday

Awesome! Your birthday is in 45 days! Happy Birthday in advance!

cheers_take3's People

Contributors

mollytaryn avatar

Watchers

James Cloos avatar  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.