Skip to content

dice roller #3202

Description

@vivek2004-sec

Is your feature request related to a problem?

Currently the repository lacks an interactive dice-rolling simulator implementation. There is no example that demonstrates visual dice representation (using ASCII/box-drawing art) combined with random number generation and side-by-side multi-dice display in a beginner-friendly way.

Describe the Solution

Add a dice_roller.py file that implements a dice-rolling simulator where:

User specifies how many dice they want to roll
Program generates a random value (1–6) for each die using random.randint(1, 6)
Each die face is displayed as ASCII/box-drawing art (using ┌, ─, │, └, and ● for pips) instead of plain numbers
Multiple dice are displayed side-by-side in a horizontal row, mimicking a real dice throw
Program calculates and prints the total sum of all dice rolled

Describe Alternatives

An alternative would be displaying dice results as plain numbers (e.g., [3, 5, 1]) or using a single vertical list of dice art printed one after another instead of a horizontal layout. Both are less visually engaging and don't resemble a physical dice roll as closely.

Additional Context

This is useful as a lightweight CLI dice-roller — e.g., for board game utilities, tabletop RPG tools, probability demonstrations, or as a beginner-friendly example of using dictionaries, string formatting, and nested loops together.

Complexity

  • Simple (< 50 lines)
  • Medium (50-200 lines)
  • Complex (> 200 lines)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions