File size: 557 Bytes
f43edf2
a361047
f43edf2
e30c530
f5c85c8
e30c530
f43edf2
e30c530
f43edf2
e30c530
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import streamlit as st
import random

st.set_page_config(page_title="Dice Roller", page_icon="🎲")

st.title("🎲 Dice Roller Game")

st.write("Click the button to roll the dice!")

if st.button("Roll Dice"):
    dice_value = random.randint(1, 6)
    st.success(f"You rolled a {dice_value}!")
    
    dice_faces = {
        1: "βš€",
        2: "⚁",
        3: "βš‚",
        4: "βšƒ",
        5: "βš„",
        6: "βš…"
    }

    st.markdown(f"<h1 style='font-size:100px; text-align: center;'>{dice_faces[dice_value]}</h1>", unsafe_allow_html=True)