DOMMETI commited on
Commit
1434d29
·
verified ·
1 Parent(s): abd02bd

Update pages/2_Events.py

Browse files
Files changed (1) hide show
  1. pages/2_Events.py +16 -2
pages/2_Events.py CHANGED
@@ -100,7 +100,7 @@ if st.button('Start the Experiment: Will it Rain or Not?',key="start_experiment_
100
  st.write(f"Event_1:Probability of having no_rain:{p_no_rain_1}")
101
  st.write(f"From the above example we can say that the simple event is giving only 1 outcome.")
102
  st.subheader("COMPOUND EVENT")
103
- st.markdown("An event is said to be a compoud event when an event gives more than on event.")
104
  st.title("Example of Compound Event")
105
  numbers_input_4 = st.text_input("Enter a list of numbers separated by commas (e.g., 1, 2, 3, 4, 5):", key="numbers_input_4")
106
  if numbers_input_4:
@@ -112,4 +112,18 @@ if numbers_input_4:
112
  list1.append(int(i))
113
  set1 = [i for i in list1 if i % 2 == 0]
114
  st.write(f"Event: Rolling a die and getting even number:{set1}")
115
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  st.write(f"Event_1:Probability of having no_rain:{p_no_rain_1}")
101
  st.write(f"From the above example we can say that the simple event is giving only 1 outcome.")
102
  st.subheader("COMPOUND EVENT")
103
+ st.markdown("An event is said to be a compoud event when an event gives more than on event.",unsafe_allow_html=True)
104
  st.title("Example of Compound Event")
105
  numbers_input_4 = st.text_input("Enter a list of numbers separated by commas (e.g., 1, 2, 3, 4, 5):", key="numbers_input_4")
106
  if numbers_input_4:
 
112
  list1.append(int(i))
113
  set1 = [i for i in list1 if i % 2 == 0]
114
  st.write(f"Event: Rolling a die and getting even number:{set1}")
115
+ st.subheader("Impossible Event")
116
+ st.markdwon("An Event is said to be immposible event when there is no chance of occuring desired event",unsafe_allow_html=True)
117
+ st.title("Example of Imposible Event")
118
+ numbers_input_5 = st.text_input("Enter a list of numbers separated by commas (e.g., 1, 2, 3, 4, 5):", key="numbers_input_5")
119
+ if numbers_input_5:
120
+ parts=numbers_input_5.split(",")
121
+ list1=[]
122
+ for i in parts:
123
+ i = i.strip()
124
+ if i.isdigit():
125
+ list1.append(int(i))
126
+ set1 = [i for i in list1 if i >6]
127
+ st.write(f"Event: Rolling a die and getting number gretaer than 6:{set1}")
128
+ st.write(f"The above event is empty because there is no chance that event will happen")
129
+