1+ {
2+  "nbformat" : 4 ,
3+  "nbformat_minor" : 0 ,
4+  "metadata" : {
5+  "colab" : {
6+  "name" : " Intersaction_and_Union.ipynb" 
7+  "version" : " 0.3.2" 
8+  "provenance" : []
9+  },
10+  "kernelspec" : {
11+  "name" : " python3" 
12+  "display_name" : " Python 3" 
13+  }
14+  },
15+  "cells" : [
16+  {
17+  "cell_type" : " markdown" 
18+  "metadata" : {
19+  "id" : " zZN6q0CIgHh9" 
20+  "colab_type" : " text" 
21+  },
22+  "source" : [
23+  " # Intersaction of Event\n " 
24+  " \n " 
25+  " ---\n " 
26+  " \n " 
27+  ]
28+  },
29+  {
30+  "cell_type" : " code" 
31+  "metadata" : {
32+  "id" : " ddwYCw7EJOLy" 
33+  "colab_type" : " code" 
34+  "colab" : {
35+  "base_uri" : " https://localhost:8080/" 
36+  "height" : 34 
37+  },
38+  "outputId" : " 628fd4bf-ebe4-4346-f476-c3ad012e5514" 
39+  },
40+  "source" : [
41+  " dice=[1,2,3,4,5,6]\n " 
42+  " \n " 
43+  " n=len(dice)\n " 
44+  " \n " 
45+  " for i in range(0,n):\n " 
46+  "  if((dice[i]%2==0)and(dice[i]%3)==0):\n " 
47+  "  print(dice[i])" 
48+  ],
49+  "execution_count" : 1 ,
50+  "outputs" : [
51+  {
52+  "output_type" : " stream" 
53+  "text" : [
54+  " 6\n " 
55+  ],
56+  "name" : " stdout" 
57+  }
58+  ]
59+  },
60+  {
61+  "cell_type" : " markdown" 
62+  "metadata" : {
63+  "id" : " Q8gY-vc6gSSf" 
64+  "colab_type" : " text" 
65+  },
66+  "source" : [
67+  " # Union of events\n " 
68+  " \n " 
69+  " ---\n " 
70+  " \n " 
71+  " \n " 
72+  ]
73+  },
74+  {
75+  "cell_type" : " code" 
76+  "metadata" : {
77+  "id" : " JXw0SR7RgMMs" 
78+  "colab_type" : " code" 
79+  "colab" : {
80+  "base_uri" : " https://localhost:8080/" 
81+  "height" : 51 
82+  },
83+  "outputId" : " f7f367f2-d034-4e32-a5e2-1bbc6bea5a5e" 
84+  },
85+  "source" : [
86+  " dice=[1,2,3,4,5,6]\n " 
87+  " \n " 
88+  " n=len(dice)\n " 
89+  " \n " 
90+  " for i in range(0,n):\n " 
91+  "  if((dice[i]==4)or(dice[i]==6)):\n " 
92+  "  print(dice[i])" 
93+  ],
94+  "execution_count" : 2 ,
95+  "outputs" : [
96+  {
97+  "output_type" : " stream" 
98+  "text" : [
99+  " 4\n " 
100+  " 6\n " 
101+  ],
102+  "name" : " stdout" 
103+  }
104+  ]
105+  }
106+  ]
107+ }
0 commit comments