Spaces:
Sleeping
Sleeping
| 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) | |