Code Monkey home page Code Monkey logo

state_capitals's Introduction

Description

I created this as a tool for our daughter to learn her state capitals. This program is also available on replit.

Verison 1 of this application asked for the capital of a state. If the answer is correct, it would not ask for the capital of that state again. If the answer was incorrect, it would state the answer was not correct and will be asked for again later. The program would continue until all the capitals were correctly answered.

Version 2 as created because my daughter expressed her frustration that when she got the question wrong because she did not know the correct answer, she would get frustrated when asked again for the capital of said state. She requested that if she answered the question incorrectly, it would respond with the correct answer and not ask for the capital of the same state again.

My other thought for Version 2 was to create a hybrid of Version 1 and 2 - if the capital was incorrect, to respond with the correct answer and ask for the capital for the said state again later.

However, since the former option was what was requested, it was what was implemented.

To run

To run this program, cd into the directory and run:

$ ruby state_capitals.rb

Change log:

Versin 2.2: December 17, 2023

  • Continue to remove capital from list if answered correctly.
  • If answered incorrectly, correct answer is given and user will be asked for the capital of said state again later.

Version 2.1: December 14, 2023

  • Remove the capital from the list if answered correctly.

Version 2: December 13, 2023

  • Updated so all state capitals are displayed every time a question is asked.
  • If incorrect answer is given, correct answer is given. The capital for the state is not asked for again.
  • Program ends after capitals for all 50 states have been asked for. When program ends, count of correct responses is displayed.

Version 1: December 3, 2023

  • Initial version release
  • Asks user for the state capital. If user answers incorrectly, user is asked for the capital of said state again later.
  • Keeps count of correct answers. When 50/50 is reached, program ends.

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.