Skip to main content

Framework for generating formatted user input questions.

Project description

MultiChoice

MultiChoice is a framework for generating formatted user input questionnaires.

Class: MultiChoice

MultiChoice(prompt, options, required=True, strict=True)

Generates multiple choice questions.

__call__(self)

  • Return: String. Returns the user selection.

__init__(self, prompt, options, required=True, strict=True)

  • Param prompt: String. Question, query or prompt for the user.
  • Param options: Tuple of Strings. Options presented to the user as a numbered sequence. The user may enter an answer as text or one of the numbers.
  • Param required: Bool. Default=True: True: Repeats question until answered. False: Accepts null input as an empty string.
  • Param strict: Bool. Default=True True: Answer must be in the options tuple. Not case-sensitive. False: Accepts any answer.

Class: FillBlank

FillBlank(prompt, required=True)

FillBlank: generates fill-in-the-blank questions.

__call__(self)

  • Return: String. Returns the user selection.

__init__(self, prompt, required=True)

  • Param prompt: String. Question, query or prompt for the user.
  • Param required: Bool. Default=True: True: Repeats question until answered. False: Accepts null input as an empty string.

Class: TrueFalse

TrueFalse(prompt, required=True, strict=True)

TrueFalse generates True or False questions.

__call__(self)

  • Return: String. Returns the user selection.

__init__(self, prompt, required=True, strict=True)

  • Param prompt: String. Question, query or prompt for the user.
  • Param required: Bool. Default=True: True: Repeats question until answered. False: Accepts null input as an empty string.
  • Param strict: Bool. Default=True True: Answer must be in the options tuple. Not case-sensitive. False: Accepts any answer.

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

MultiChoice-0.1.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

MultiChoice-0.1-py3-none-any.whl (1.6 kB view details)

Uploaded Python 3

File details

Details for the file MultiChoice-0.1.tar.gz.

File metadata

  • Download URL: MultiChoice-0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.4

File hashes

Hashes for MultiChoice-0.1.tar.gz
Algorithm Hash digest
SHA256 1a784f68203b0f2cf011f4856001b65b3eefe0c621e9f5f5794c4848423fd7f8
MD5 e584de9202f904e50521a0b05fe27efc
BLAKE2b-256 0d355686eed5dfc585c0fd06f82d7f33f87180a1de6cfe6c32ab30d10bce0d9e

See more details on using hashes here.

File details

Details for the file MultiChoice-0.1-py3-none-any.whl.

File metadata

  • Download URL: MultiChoice-0.1-py3-none-any.whl
  • Upload date:
  • Size: 1.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.4.2 requests/2.20.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/3.7.4

File hashes

Hashes for MultiChoice-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eac34f8e117b1cb0ad47c3f6f3ef45372b05e6467626c996d9ad55c819f53a38
MD5 81659a90b2d76f21974b4bdda83cde9b
BLAKE2b-256 9c4d77d10e80e13acc5d248595c1709dd0625a5f0860f29573b636ccf4ebc1c2

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