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

imported>Jesstess
imported>Jesstess
Line 504:
 
==Making choices==
 
We can use these expressions that <i>evaluate</i> to booleans to make decisions and conditionally execute code:.
 
[[File:Fork.png|100px]]
Line 509 ⟶ 511:
====if statements====
 
The simplest way to make a choice in Python is with the <code>if</code> keyword. Here's an example:
We can use these expressions that <i>evaluate</i> to booleans to make decisions and conditionally execute code:
 
<pre>
Anonymous user