DOMMETI commited on
Commit
8487619
·
verified ·
1 Parent(s): d1c7d08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -2
app.py CHANGED
@@ -102,6 +102,21 @@ st.subheader("Random Experiment")
102
  st.markdown("""A random experiment is also an experiment bt in order to become a random experiment it show satisfy 2 condition's.
103
  <ul class="icon-bullet">
104
  <li>It show have more than one outcome.</li>
105
- <li>We cannot predict what will be the outcome of the experiment.<li>
106
  </ul>
107
- """,unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  st.markdown("""A random experiment is also an experiment bt in order to become a random experiment it show satisfy 2 condition's.
103
  <ul class="icon-bullet">
104
  <li>It show have more than one outcome.</li>
105
+ <li>We cannot predict what will be the outcome of the experiment.</li>
106
  </ul>
107
+ """,unsafe_allow_html=True)
108
+ import streamlit as st
109
+ import random
110
+
111
+ # Title for the Streamlit app
112
+ st.title("Random Experiment: Coin Toss")
113
+
114
+ # Description
115
+ st.write("""
116
+ This simple experiment simulates a random coin toss. Each time you click the button, the coin is tossed, and the result will be either 'Heads' or 'Tails'.
117
+ """)
118
+
119
+ # Button to simulate the coin toss
120
+ if st.button('Toss the Coin'):
121
+ result = random.choice(['Heads', 'Tails']) # Randomly choose between Heads or Tails
122
+ st.write(f"The result is: **{result}**")