Python dice game
DEMONul1234 (11)

Simple dice game with a few simple options.

You are viewing a single comment. View All
dillonjoshua68 (34)

If you’re a beginner... like me... this program is actually very good... and it’s good u invested ur time in doing this.

Just for additional info... if you want to add An animation do this..

import sys (1st line)
import time

def anim(txt):
for x in txt:
print(x, end=‘’)
time.sleep(0.06)
sys.stdout.flush()

That’s the function...

Now to apply it...

Instead of using print do this...

call the function Instead of using print

then take input

anim(“Enter a number from 1-6: “)
variable_name = int(input(“”))

leave the input space empty, but make sure to put quotes (I’m not sure if quotes are needed tho)

dillonjoshua68 (34)

Make sure to use indents

dillonjoshua68 (34)

Refer to my guessing game program and how I applied it, or my other pinned program

DEMONul1234 (11)

@dillonjoshua68 Looks like sth worth considering as I really hadn't thought of animating it before I posted this dice game. Just tried to do sth interesting with Python without really commiting to it, if you get my meaning. Thanks for tip, much appriciated

dillonjoshua68 (34)

Btw, make the random.randint(1,6) since a dice has 6 sides @DEMONul1234

DEMONul1234 (11)

@dillonjoshua68 oh, totally forgot to put 1 instead of 0, my bad

dillonjoshua68 (34)

Additionally, you can import randint without importing random...
from random import randint
@DEMONul1234

DEMONul1234 (11)

@dillonjoshua68 Ok, I may make some mistakes as I've recently stared to create programmes by myself after watching many tutorials. Will work over it. In addition, I added (on my profile's programme version) option to create player name, you know, just to make it more...convinient? I guess...

dillonjoshua68 (34)

@DEMONul1234 sorry if I offended u.... ☹️.. but hope this helps 🙃😜

DEMONul1234 (11)

@dillonjoshua68 You didn't really offend me in any way. Guess I made it sound as if I got offended.

dillonjoshua68 (34)

😅😅 ok anyways, let’s continue programming💥 @DEMONul1234

dillonjoshua68 (34)

Btw, are u new to programming, python ur first language? Or do u know another lang? @DEMONul1234

DEMONul1234 (11)

@dillonjoshua68 Well, I wouldn't consider myself new, but due to personal problems I hadn't had much time to code, which affected my programming. Python has been my 1st language for a year now, I think. Will try to learn ruby and crystal once I'll remember most of Python stuff.

dillonjoshua68 (34)

Same dude, I’m currently learning python... I got to know lots about it recently due to repl.it @DEMONul1234 during the summer vacation imma learn python deeper in udemy and also possibly java or c++