npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

capital-city-quiz

v1.0.4

Published

It's a quiz app where you guess the capital name from the country name.

Downloads

8

Readme

capital-city-quiz

This is a CLI quiz application where you guess the capitals of countries around the world.

Install

npm install -g capital-city-quiz

Supported Language

  • English (Default)
  • Japanese

Please note that the default language of the application is English. You can switch to Japanese by using the -j option

Usage

Quiz Mode

Launch

To start the quiz, enter the following command:

capital-city-quiz

Selecting the Scope

Choose the scope of the quiz:

? Please select the scope: …
▸ [1] All countries
  [2] By continent

If you choose By continent

Select the continent you want to answer questions about:

? Please select a continent: …
▸ Africa
  Antarctica
  Asia
  Europe
  North America
  Oceania
  South America

Entering the Number of Questions

Enter the number of questions you want to be asked. The number of available questions is as follows:

  • All countries: 250
  • Africa : 58
  • Antarctica : 5
  • Asia : 53
  • Europe : 52
  • North America: 41
  • Oceania : 27
  • South America: 14
? How many questions would you like to answer? ‣ 10

The quiz will begin. A country name is displayed, and you must select the correct capital city.

Now, let's start with Question 1!
? Country: Japan
Which is the capital of this country?
Select your answer: …
▸ Washington D.C.
  Tokyo
  Moscow
  Copenhagen

After selecting a capital city, the app will indicate whether you are correct or incorrect. If incorrect, it will show the right answer.

Oops! Not quite. The correct answer is "Tokyo".

Once you have answered the number of questions you initially entered, the app will display your total correct answers and accuracy rate.

You got 5 out of 10 questions right! Your accuracy rate is 50%.

View Mode

By starting the app with the-voption, you can view the list of capitals of different countries.

$ capital-city-quiz -v
? Please select the scope: …
▸ [1] All countries
  [2] By continent
Andorra: Andorra la Vella
United Arab Emirates: Abu Dhabi
Afghanistan: Kabul
Antigua and Barbuda: Saint John's
Anguilla: The Valley
...

Japanese Mode

With the -j option, you can enjoy the quiz in Japanese.

$ capital-city-quiz -j

In this mode, the questions will be presented in Japanese. For example:

? 国名: 日本
この国の首都はどこでしょうか?: …
▸ ワシントンD.C.
  東京
  モスクワ
  コペンハーゲン

This option also applies to the view mode, allowing you to view the capitals in Japanese.


✔ 出題範囲を選択してください。 · [1] すべての国
アンドラ: アンドラ・ラ・ベリャ
アラブ首長国連邦: アブダビ
アフガニスタン: カブール
アンティグア・バーブーダ: セントジョンズ
アンギラ: ザ・バレー
...

Enjoy!

License

This software is released under the MIT License.