# Practical Programming
# Exercises - 3.8
# 1 - expressions
# ------------------------------------------------------------------------------
#print "'Comp''Sci'\t", 'Comp''Sci'
#print "'Computer' + 'Science'\t", 'Computer' + 'Science'
#print "'H20' * 3\t", 'H20' * 3
#print "'C02' * 0\t", 'C02' * 0, "\t(This is '' actually.)"
# 2 - phrases
# ------------------------------------------------------------------------------
#print 'a).', "They'll hibernate during the winter."
#print 'b).', '"Absolutely not," he said.'
#print 'c).', '"He said, \'Absolutely not,"\' recalled Mel'
#print 'd).', 'hydrogen sulfide'
#print 'e).', 'left\\right'
# 3 - rewrite
# ------------------------------------------------------------------------------
#print '\'\'\'A\nB\nC\'\'\''
# 4 - len()
# ------------------------------------------------------------------------------
#print len('')
# 5 - some prints
# ------------------------------------------------------------------------------
#x = 3
#y = 12.5
#print 'The rabbit is %d.' % x
#print 'The rabbit is', x, 'years old.'
#print y, 'is average.'
#print y, '*', x
#print y, '*', x, 'is %.1f.' % (y * x)
# 6 - True or False
# ------------------------------------------------------------------------------
#print '\'g\' == "g"',
#if 'g' == "g":
#print '\tTrue'
#else:
#print '\tFalse'
#print "'g' == 'G'",
#if 'g' == 'G':
#print '\tTrue'
#else:
#print '\tFalse'
#print "'a' >= 'b'",
#if 'a' >= 'b':
#print '\tTrue'
#else:
#print '\tFalse'
#print "'ant' < 'abc'",
#if 'ant' < 'abc':
#print '\tTrue'
#else:
#print '\tFalse'
#print "'ant' > 'Ant'",
#if 'ant' > 'Ant':
#print '\tTrue'
#else:
#print '\tFalse'
#print "'ant' > 'Abc'",
#if 'ant' > 'Abc':
#print '\tTrue'
#else:
#print '\tFalse'
#print "'ant' < 'anti'",
#if 'ant' < 'anti':
#print '\tTrue'
#else:
#print '\tFalse'
# 7 - raw_input()
# ------------------------------------------------------------------------------
#num = float(raw_input('enter a number: '))
#print 'The number you entered has been convert to float:', num
# 8 - An interesting question
# ------------------------------------------------------------------------------
#print '-' * 20
#print ">>>'abc' 'def'\n", 'abc' 'def'
#print '-' * 20
#print ">>> left = 'abc'\n", ">>> right = 'def'\n", ">>> left right\n", 'File "<stdin>" , line 1\n', 'left right\n', ' ^\n', 'SyntaxError: invalid syntax'
#print '-' * 20
#print "I think the reason why this happens is that when you enter the original\n", "string such as 'abc' or 'def', it's recognized as string as it is. But \n", "when you assign it to the variable such as left or right, it's hard to \n", "know whether it's a string or a integer, so you cannot choose a proper \n", "operation for them. And that comes a error."
# 9 -
# ------------------------------------------------------------------------------
#print "'like' * -1", "is", 'like' * -1
#print "So multiplying a string by a negative number produce an ''"
#print "Some people believe it will produce an error, That's because\n", "they may think the amount of characters of a string should be 0 \n", "or positive."