Boston Python Workshop 8/Friday/Tutorial for print: Difference between revisions

no edit summary
imported>Jesstess
(Created page with "__NOTOC__ ==Math== Math in Python looks a lot like math you type into a calculator. A Python prompt makes a great calculator if you need to crunch some numbers and don't ha...")
 
imported>Jesstess
No edit summary
 
Line 298:
(h + b) * 10
</pre>
 
==Part 1 Practice==
 
Read the following expressions, but don't execute them. Guess what the output will be. After you've made a guess, copy and paste the expressions at a Python prompt and check your guess.
 
1.
<pre>
total = 1.5 - 1/2
total
type(total)
</pre>
 
2.
<pre>
a = "quick"
b = "brown"
c = "fox jumps over the lazy dog"
"The " + a * 3 + " " + b * 3 + " " + c
</pre>
 
==End of Part 1==
 
Congratulations! You've learned about and practiced math, strings, variables, data types, exceptions, tracebacks, and executing Python from the Python prompt.
 
Take a break, stretch, meet some neighbors, and ask the staff if you have any questions about this material.
 
== Part 2: Printing==
Anonymous user