Skip to content

pi3t4/Dice-Roll-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Dice Roll Generator Overview This Python script is a efficient and simple dice roll generator that allows you to roll one or two six-sided dice. It prompts the user for the number of dice and then displays the result, including individual values and their total

Usage 1 Run the script in a Python environment. 2 Enter the number of dice you want to roll (1 or 2). 3 The script will simulate the dice roll and display the results.

Features

  • Supports rolling one or two dice.
  • Clear screen functionality for a better user experience. How to Run Ensure you have Python installed on your machine. Open a terminal or command prompt, navigate to the script's directory, and run the following command:

bash

python dice_roll.py

Example

Number of dice: 2
Rolling the dice...
The values are:
Dice One:  3
Dice Two:  5
Total:  8
Roll Again? y

Notes

  • The script efficiently clears the console screen for a cleaner display.
  • Input validation ensures that only '1' or '2', as well as their textual representations ('one' or 'two'), are accepted for the number of dice. Feel free to use and modify this script as needed for your projects or entertainment purposes. Happy rollings! 🎲

About

This Python script serves as a lightweight and efficient dice roll generator, allowing users to simulate the roll of one or two six-sided dice. The script provides a seamless experience, featuring a clear console screen for improved readability and input validation for a user-friendly interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages