Skip to content

Commit 493f9f6

Browse files
authored
Merge pull request #2 from s-kganz/master
Add 2-3 sample code
2 parents da3de46 + b3a24de commit 493f9f6

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Lesson 2/exercise2-3.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'''
2+
3+
#An example of truth tables with AND
4+
#Remove the quotes above and below to see what the program does.
5+
6+
#And truth tables
7+
print("-------------------------")
8+
print("| P " + "| Q " + "| P AND Q |")
9+
print("-------------------------")
10+
statement1 = #insert True/False statement here
11+
statement2 = #insert True/False statement here
12+
print("|" + str(statement1) + " |" + str(statement2) + " |" +
13+
str(statement1 and statement2) + " |")
14+
print("-------------------------")
15+
16+
'''

0 commit comments

Comments
 (0)