Skip to main content

Find the greatest value among a bunch of numbers via my Logic using sets and lists

Project description

Pypi-contribution

Greatest Module

The Greatest module provides a class Greatest with a static method setGreat that finds the greatest value from a list or a series of numbers. Users can either pass a predefined list or specify the number of values they want to enter manually.

Installation

To use the Greatest module, simply download or clone this repository. Once you have the files, you can import the Greatest class directly into your project.

Usage

Method: setGreat

The setGreat method allows you to find the greatest number in a list or by providing a count of numbers to input.

Parameters:

  • arg: Accepts either an int or list. If an integer is passed, it is treated as n (the number of values you want to enter manually). If a list is passed, the list values are used directly.
  • n (optional): Specifies the number of values to input if a list is not provided.
  • listofchoice (optional): A list of numbers to find the maximum from. Ignored if arg is an integer.

Returns:

  • int: The greatest number from the provided or entered values.

Example

from Greatest import Greatest

# Option 1: Provide a number of inputs directly
greatest_value = Greatest.setGreat(5)  # Prompts for 5 values
print("Greatest Value:", greatest_value)

# Option 2: Provide a list directly
greatest_value = Greatest.setGreat([1, 3, 7, 2, 5])
print("Greatest Value:", greatest_value)

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

setsgreatest-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file setsgreatest-0.1.0.tar.gz.

File metadata

  • Download URL: setsgreatest-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.0

File hashes

Hashes for setsgreatest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c0b02c378febd56dc201f6203ee3d5635739dc596a4d4cdbfdf03457bd70d8d1
MD5 be1a60d3c0779a9cf592d0e8c39e6563
BLAKE2b-256 ddf315362c91889a5efd58b18e5f64fb273354731810e00e02c4188dca7951f2

See more details on using hashes here.

Supported by

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