Python Forum
A CLI based Dice Roller.
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A CLI based Dice Roller.
#9
Do whatever you want...

For the benefit of the other who may look at the thread
from random import choice
faces = ['X X X\nX 0 X\nX X X', '0 X X\nX X X\nX X 0', '0 X X\nX 0 X\nX X 0',
         '0 X 0\nX X X\n0 X 0', '0 X 0\nX 0 X\n0 X 0', '0 X 0\n0 X 0\n0 X 0']
while True:
    user_input = input("Press Enter to roll a dice. Press any other key to exit the simulator: ")
    if user_input:
        break
    print(choice(faces))
print("Goodbye")
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs



Messages In This Thread
A CLI based Dice Roller. - by Ablazesphere - Oct-24-2018, 03:48 PM
RE: A CLI based Dice Roller. - by ichabod801 - Oct-24-2018, 04:57 PM
RE: A CLI based Dice Roller. - by nilamo - Oct-24-2018, 09:39 PM
RE: A CLI based Dice Roller. - by Ablazesphere - Oct-26-2018, 10:12 AM
RE: A CLI based Dice Roller. - by buran - Oct-26-2018, 10:15 AM
RE: A CLI based Dice Roller. - by Ablazesphere - Oct-26-2018, 10:19 AM
RE: A CLI based Dice Roller. - by buran - Oct-26-2018, 10:39 AM
RE: A CLI based Dice Roller. - by Ablazesphere - Oct-26-2018, 10:46 AM
RE: A CLI based Dice Roller. - by buran - Oct-26-2018, 11:11 AM
RE: A CLI based Dice Roller. - by Ablazesphere - Oct-26-2018, 11:20 AM
RE: A CLI based Dice Roller. - by snippsat - Oct-26-2018, 11:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dice roller with Tkinter GUI Yojul 1 6,309 Oct-24-2018, 01:40 AM
Last Post: ichabod801
  Dice Roller mcmxl22 4 4,141 Feb-05-2018, 09:45 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020