Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> >>> question1() '1111' >>> 0%3 0 >>> 1%3 1 >>> 2%3 2 >>> ================================ RESTART ================================ >>> >>> question2() 0 mod = 0 output = 0 1 mod = 1 output = 1 2 mod = 2 output = 3 3 mod = 0 output = 3 4 mod = 1 output = 4 5 mod = 2 output = 6 6 mod = 0 output = 6 7 mod = 1 output = 7 8 mod = 2 output = 9 9 mod = 0 output = 9 9 >>> question3() ****** ***** **** *** ** * >>> rate_your_sandwich_experience() Print Thank you for agreeing to complete questionaire about your sandwich experience. Your results will be Entered into our database, so we can serve you better in the future. Please rate freshness of bread on a scale from 1 (bad) to 5 (great) :3 Please rate freshness of filling on a scale from 1 (bad) to 5 (great) :4 Please rate tastiness of condiments on a scale from 1 (bad) to 5 (great) :2 Please rate color of sandwich on a scale from 1 (bad) to 5 (great) :5 9.25 >>> hat_size(8) Your hat size is 2 1/2 2.5 >>> hat_size(14) Your hat size is 4 1/2 4.5 >>> question8() **************************************** **************Hello*World!************** ****This*is*a*Python*print*statement**** ***You*can*recognize*it*by*its*syntax*** **************************************** >>> ================================ RESTART ================================ >>> >>> intersperse() Please input 2 strings that are the same length. string1: abcdefghij string2: 1234567890 a1b2c3d4e5f6g7h8i9j0 >>> ================================ RESTART ================================ >>> >>> intersperse() Please input 2 strings that are the same length. string1: abcdefghij string2: 1234567890 'a1b2c3d4e5f6g7h8i9j0' >>> for char in 'abcd': print(char) a b c d >>> num = 0 >>> num += 1 >>> num 1 >>> num = num + 1 >>> num 2 >>> ================================ RESTART ================================ >>> >>> '555'.isalnum() True >>> 'fivefivefive'.isalnum() True >>> 'five five five'.isalnum() False >>> '555'.isdigit() True >>> 'fivefivefive'.isdigit() False >>> '555'.isnumeric() True >>> print('\u2555') ╕ >>> print('\u2155') ⅕ >>> '\u2155'.isnumeric() True >>> '\u2155'.isdigit() False >>> 'bug'.isidentifier() True >>> 'bug55'.isidentifier() True >>> '5bug55'.isidentifier() False >>> 'Gone With The Wind'.istitle() True >>> 'Gone with The Wind'.istitle() False >>> ' '.isprintable() True >>> '\u0000'.isprintable() False >>> 'hello world'.capitalize() 'Hello world' >>> 'HELLO WORLD'.lower() 'hello world' >>> 'hello world'.title() 'Hello World' >>> 'Hello World'.swapcase() 'hELLO wORLD' >>> 'Hello World'.center(20,'*') '****Hello World*****' >>> 'Hello World'.center(30,'^') '^^^^^^^^^Hello World^^^^^^^^^^' >>> 'Hello World'.ljust(30,'^') 'Hello World^^^^^^^^^^^^^^^^^^^' >>> 'Hello World'.rjust(30,'^') '^^^^^^^^^^^^^^^^^^^Hello World' >>> '{whose} {thing} is nice'.format(whose = 'John\'s', thing = 'code') "John's code is nice" >>> 'The big bad bug bled bad blood'.find('bad') 8 >>> 'The big bad bug bled bad blood'.rfind('bad') 21 >>> 'The big bad bug bled bad blood'.rfind('bag') -1 >>> 'The big bad bug bled bad blood'.rindex('bag') Traceback (most recent call last): File "", line 1, in 'The big bad bug bled bad blood'.rindex('bag') ValueError: substring not found >>> ' Hello World '.strip(' ') 'Hello World' >>> ' Hello World '.lstrip(' ') 'Hello World ' >>> ' Hello World '.rstrip(' ') ' Hello World' >>> '***Hello World '.strip('*') 'Hello World ' >>> 'Five Hundred Fifty Five'.split(' ') ['Five', 'Hundred', 'Fifty', 'Five'] >>> 'Five Hundred Fifty Five'.split('F') ['', 'ive Hundred ', 'ifty ', 'ive'] >>> 'Five Hundred Fifty Five'.partition(' ') ('Five', ' ', 'Hundred Fifty Five') >>> 'Five Hundred Fifty Five'.rpartition(' ') ('Five Hundred Fifty', ' ', 'Five') >>>