Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -127,9 +127,9 @@ if st.button('Start the Experiment: Will it Rain or Not?'):
|
|
| 127 |
result = random.choice(['Rain', 'No Rain'])
|
| 128 |
st.write(f"Trial {i}: **{result}**")
|
| 129 |
st.subheader("Outcome")
|
| 130 |
-
st.markdown("""Outcome is nothing but result of a trail.""")
|
| 131 |
st.subheader("Sample Space")
|
| 132 |
-
st.markdown("""Set of all possible outcome of Sample Space..""")
|
| 133 |
st.title("Example of Sample Space")
|
| 134 |
Trail_1 = st.number_input("Number of Trials:", min_value=1, max_value=100, value=7,key="Trail_1")
|
| 135 |
if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment"):
|
|
@@ -138,4 +138,18 @@ if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment"
|
|
| 138 |
for i in range(1, Trail_1 + 1):
|
| 139 |
result = random.choice(['Rain', 'No Rain'])
|
| 140 |
list1+=[result]
|
| 141 |
-
st.write(f"Sample_Space:{np.unique(list1)}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
result = random.choice(['Rain', 'No Rain'])
|
| 128 |
st.write(f"Trial {i}: **{result}**")
|
| 129 |
st.subheader("Outcome")
|
| 130 |
+
st.markdown("""Outcome is nothing but result of a trail.""",unsafe_allow_html=True)
|
| 131 |
st.subheader("Sample Space")
|
| 132 |
+
st.markdown("""Set of all possible outcome of Sample Space..""",unsafe_allow_html=True)
|
| 133 |
st.title("Example of Sample Space")
|
| 134 |
Trail_1 = st.number_input("Number of Trials:", min_value=1, max_value=100, value=7,key="Trail_1")
|
| 135 |
if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment"):
|
|
|
|
| 138 |
for i in range(1, Trail_1 + 1):
|
| 139 |
result = random.choice(['Rain', 'No Rain'])
|
| 140 |
list1+=[result]
|
| 141 |
+
st.write(f"Sample_Space:{np.unique(list1)}")
|
| 142 |
+
st.subheader("Event")
|
| 143 |
+
st.markdown("It's a subset of sample space or in easy term's the question's raised on a random experiemnt.",unsafe_allow_html=True)
|
| 144 |
+
st.title("Example of an Event")
|
| 145 |
+
Trail_2 = st.number_input("Number of Trials:", min_value=1, max_value=100, value=7,key="Trail_2")
|
| 146 |
+
if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment_1"):
|
| 147 |
+
st.write(f"Running {Trail_1} trials...")
|
| 148 |
+
list1=[]
|
| 149 |
+
for i in range(1, Trail_2 + 1):
|
| 150 |
+
result = random.choice(['Rain', 'No Rain'])
|
| 151 |
+
list1+=[result]
|
| 152 |
+
st.write(f"Sample_Space:{np.unique(list1)}")
|
| 153 |
+
st.write(f"Event_1 Chance of Rain:{Rain}")
|
| 154 |
+
st.write(f"Event_2 Chance No of Rain:{No_Rain}")
|
| 155 |
+
st.write(f"Both Event_1 and Event_2 are subset of sample space")
|