Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f53a8e7

Browse files
Added Truth Table in Assignment-2
1 parent 32cf2d3 commit f53a8e7

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

‎Assignment-2.ipynb

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,45 @@
5454
"## The 3 types of boolean operators are AND, OR and NOT"
5555
]
5656
},
57+
{
58+
"cell_type": "markdown",
59+
"metadata": {},
60+
"source": [
61+
"## AND GATE TRUTH TABLE\n",
62+
"\n",
63+
"| A | B | A.B |\n",
64+
"| --- | --- | --- |\n",
65+
"| 0 | 0 | 0 |\n",
66+
"| 0 | 1 | 0 |\n",
67+
"| 1 | 0 | 0 |\n",
68+
"| 1 | 1 | 1 |\n"
69+
]
70+
},
71+
{
72+
"cell_type": "markdown",
73+
"metadata": {},
74+
"source": [
75+
"## OR GATE TRUTH TABLE\n",
76+
"\n",
77+
"| A | B | A+B |\n",
78+
"| --- | --- | --- |\n",
79+
"| 0 | 0 | 0 |\n",
80+
"| 0 | 1 | 1 |\n",
81+
"| 1 | 0 | 1 |\n",
82+
"| 1 | 1 | 1 |"
83+
]
84+
},
85+
{
86+
"cell_type": "markdown",
87+
"metadata": {},
88+
"source": [
89+
"## NOT GATE TRUTH TABLE\n",
90+
"| A | ~A | \n",
91+
"| --- | --- |\n",
92+
"| 0 | 1 | \n",
93+
"| 1 | 0 | "
94+
]
95+
},
5796
{
5897
"cell_type": "code",
5998
"execution_count": 25,
@@ -97,7 +136,7 @@
97136
},
98137
{
99138
"cell_type": "code",
100-
"execution_count": 29,
139+
"execution_count": 1,
101140
"metadata": {},
102141
"outputs": [
103142
{
@@ -106,7 +145,7 @@
106145
"False"
107146
]
108147
},
109-
"execution_count": 29,
148+
"execution_count": 1,
110149
"metadata": {},
111150
"output_type": "execute_result"
112151
}
@@ -259,8 +298,8 @@
259298
}
260299
],
261300
"source": [
262-
"## According to me there is 2 blocks if else blocks in the code.I dont find 3\n",
263-
"spam = \n",
301+
"## According to me there is 2 if else blocks in the code.I dont find 3\n",
302+
"spam = 10\n",
264303
"if spam == 10:\n",
265304
" print('eggs')\n",
266305
" if spam > 5:\n",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /