Skip to main content

A command line tool to help people prepare for their US naturalization test.

Project description

natquiz - a US naturalization test quiz app

natquiz is a tool designed to help you prepare for the US naturalization test. It provides a set of questions that mimic an actual test, allowing you to practice and improve your knowledge of US Civics.

Features

  • Comprehensive question bank: natquiz includes the full set of questions covering all sections of the US naturalization test.
  • Randomized quizzes: Each quiz you take is randomly generated, ensuring that you get a unique set of questions every time.
  • Full question bank: The full question bank can be viewed from the command line.

Installation

To install the package, issue the command pip install natquiz (requires Python >= 3.11 which you can download from python.org/downloads).

Usage

Upon installation, use the natquiz command. On mac/linux computers you can use the terminal app; on Windows you can use Powershell, Windows terminal or any other terminal application you already use.

$ natquiz --help
usage: natquiz [-h] [-n N] [--show-all] [--clear-scr]

natquiz - a US naturalization quiz app

options:
  -h, --help   show this help message and exit
  -n N         Number of questions to ask (default: 10)
  --show-all   Show all questions and exit
  --clear-scr  Clear screen after answer is shown (default: False unless
               specified)

To get a regular, 10-question quiz simply issue the natquiz command.

$ natquiz

- US Naturalization Quiz -    

Number of questions to ask: 10

Question 1 of 10
Category: INTEGRATED CIVICS
What is the capital of the United States?
(Press enter to show answers)

As shown, press enter to show the answers to the question. Press enter again to display the next question.

- US Naturalization Quiz -    

Number of questions to ask: 10

Question 1 of 10
Category: INTEGRATED CIVICS
What is the capital of the United States?
(Press enter to show answers)
        Answer 1: Washington, D.C.

(Press enter for the next question)

Question 2 of 10
Category: Rights and Responsibilities
What are two ways that Americans can participate in their democracy?
(Press enter to show answers)

After the last question you get the option to do another quiz or exit.

Question 10 of 10
Category: Principles of American Democracy
How many amendments does the Constitution have?
(Press enter to show answers)
        Answer 1: twenty-seven (27)


This is the end of the quiz. Would you like to do another quiz? (Yes/No):
|

Enter yes or y to do another quiz or no or n to exit.

This is the end of the quiz. Would you like to do another quiz? (Yes/No):
n
Good luck on your interview!

If you would like a quiz with fewer than 10 questions, use the -n option with the number of questions you would like for the quiz. For example, you would get a two-question quiz with natquiz -n 2 or natquiz -n=2.

To view all the questions issue natquiz --show-all.

To clear the previous question and its answer(s) before displaying the next question, use the --clear-scr switch. For example, natquiz --clear-scr.

Contributing

Contributions are welcome via PRs!

License

MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

natquiz-0.3.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

natquiz-0.3.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file natquiz-0.3.0.tar.gz.

File metadata

  • Download URL: natquiz-0.3.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for natquiz-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d7c6b1b2d3c9f7cdfd6efe7b68e79a89f34b19988e548979cced586788bfef5c
MD5 14f9fee699b720db15df81cc5b99862f
BLAKE2b-256 b4b2a79ff75c14546722f95ac1fc0eee5892248b696bd0c6d21ae1fd8b134f61

See more details on using hashes here.

File details

Details for the file natquiz-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: natquiz-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for natquiz-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c06755c14ea6e95ea42998227e0b17c1d76746d5da60c81e927cc07e045b80b
MD5 4cc33e069f552dd11b74b235b96774f3
BLAKE2b-256 7cea16434844613215757cd4397bd78010cffc8a2c0ca729f687df9330c355ec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page