2010.1014 Ch2.3 Python Interpreter

4056 days ago by calcpage123

#2)MRG show(2+-2) show(2+(+2)) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}4
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}4
#3) print 2+(+(+2)) 
       
4
4
#4) show(2**3) show(2**4) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}8
\newcommand{\Bold}[1]{\mathbf{#1}}16
\newcommand{\Bold}[1]{\mathbf{#1}}8
\newcommand{\Bold}[1]{\mathbf{#1}}16
#5) concatenation 'abc'+'def' 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{abcdef}
\newcommand{\Bold}[1]{\mathbf{#1}}\hbox{abcdef}
#6) "12"*3 
       
\newcommand{\Bold}[1]{\mathbf{#1}}121212
\newcommand{\Bold}[1]{\mathbf{#1}}121212
#7) show(9-8*2+6) show((5-1)*(1+2)**3) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-1
\newcommand{\Bold}[1]{\mathbf{#1}}108
\newcommand{\Bold}[1]{\mathbf{#1}}-1
\newcommand{\Bold}[1]{\mathbf{#1}}108
#8) def mystery1(x): return (x-2)**3+(3*x) mystery1(1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}2
\newcommand{\Bold}[1]{\mathbf{#1}}2
def mystery2(x): return (x-2)**3+3*x mystery2(1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}2
\newcommand{\Bold}[1]{\mathbf{#1}}2
def mystery3(x): return x-2**3+(3*x) mystery3(1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-4
\newcommand{\Bold}[1]{\mathbf{#1}}-4
def mystery4(x): return x-2**3+3*x mystery4(1) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}-4
\newcommand{\Bold}[1]{\mathbf{#1}}-4
plot(((x-2)**3+(3*x),x-2**3+(3*x)),-10,10,ymin=-100,ymax=100) 
       
#9) def reciprocal(x): return 1/x show(1+reciprocal(2*5)) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{11}{10}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{11}{10}
#10) 1-2*3/6 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0
1-2*3%6 
       
\newcommand{\Bold}[1]{\mathbf{#1}}1
\newcommand{\Bold}[1]{\mathbf{#1}}1
1-2*3//6 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0
\newcommand{\Bold}[1]{\mathbf{#1}}0