-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex6.py
39 lines (27 loc) · 801 Bytes
/
ex6.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Define variable x
x = "There are %d types of people. " % 10
# Define variable binary
binary = "binary"
# Define variable do_not
do_not = "don't"
# Define variable y using variables binary, and do_not
y = "Those who know %s and those who %s." % (binary, do_not)
# Print X
print x
# Print Y
print y
# Print X w/ quotes
print "I said: %r" % x
# Print y w/ quotes
print "I also said: '%s'." % y
# Define variable hilarious as boolean false
hilarious = False
# Define variable joke_evaluation
joke_evaluation = "Isn't that joke so funny?! %r"
# Print joke_evaluation using variable hilarious
print joke_evaluation % hilarious
# Define variables w, and e
w = "This is the left side of..."
e = "a string with a right side."
# Print variables w, e and combine the results as strings
print w + e