Source

cointoss1973.bitbucket.org / landslide-example / python-intro.html

Full commit
<!DOCTYPE html>
<!--
  Copyright 2010 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  Original slides: Marcin Wichary (mwichary@google.com)
  Modifications: Ernest Delgado (ernestd@google.com)
                 Alex Russell (slightlyoff@chromium.org)

  landslide modifications: Adam Zapletal (adamzap@gmail.com)
                           Nicolas Perriault (nperriault@gmail.com)
-->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>Python</title>
    <!-- Styles -->
    
    <link rel="stylesheet" media="print" href="file://c:\Python27\lib\site-packages\landslide\themes\default\css\print.css">
    <link rel="stylesheet" media="screen, projection" href="file://c:\Python27\lib\site-packages\landslide\themes\default\css\screen.css">
    
    
    <!-- /Styles -->
    <!-- Javascripts -->
    
    <script type="text/javascript" src="file://c:\Python27\lib\site-packages\landslide\themes\default\js\slides.js"></script>
    
    
    <!-- /Javascripts -->
</head>
<body>
  <div id="blank"></div>
  <div class="presentation">
    <div id="current_presenter_notes">
      <div id="presenter_note"></div>
    </div>
    <div class="slides">
      
      <!-- slide source: python.rst -->
      <div class="slide-wrapper">
        <div class="slide">
          <div class="inner">
            
            <header><h1>Python</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="python.rst">python.rst</a>
            </aside>
            
            <aside class="page_number">
              1/5
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: python.rst -->
      <div class="slide-wrapper">
        <div class="slide">
          <div class="inner">
            
            <header><h1>If</h1></header>
            
            
            <section><ul class="simple">
<li>() を使わないでください</li>
<li><tt class="docutils literal">:</tt> を行の最後につけるのを忘れないこと</li>
</ul>
<p>コードをみてみよう:</p>
<blockquote>
<pre><span class="n">x</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span>
<span class="k">if</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="n">y</span><span class="p">:</span>
    <span class="k">print</span> <span class="s">&#39;x is greater&#39;</span>
</pre>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="python.rst">python.rst</a>
            </aside>
            
            <aside class="page_number">
              2/5
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: python.rst -->
      <div class="slide-wrapper">
        <div class="slide">
          <div class="inner">
            
            <header><h1>For</h1></header>
            
            
            <section><ul class="simple">
<li><tt class="docutils literal">for</tt> はシーケンスを反復します</li>
<li><tt class="docutils literal">:</tt> を行の最後につけるのを忘れないこと</li>
</ul>
<p>コードをみてみよう:</p>
<blockquote>
<pre><span class="n">numbers</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">5</span><span class="p">,]</span>
<span class="k">for</span> <span class="n">number</span> <span class="ow">in</span> <span class="n">numbers</span><span class="p">:</span>
    <span class="k">print</span> <span class="n">number</span>
</pre>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="python.rst">python.rst</a>
            </aside>
            
            <aside class="page_number">
              3/5
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: python.rst -->
      <div class="slide-wrapper">
        <div class="slide">
          <div class="inner">
            
            <header><h1>While</h1></header>
            
            
            <section><ul class="simple">
<li><tt class="docutils literal">while</tt><tt class="docutils literal">if</tt> に似ていますが、 条件が 真の間実行します。</li>
<li>() を使わないでください</li>
<li><tt class="docutils literal">:</tt> を行の最後につけるのを忘れないこと</li>
</ul>
<p>コードをみてみよう:</p>
<blockquote>
<pre><span class="kn">from</span> <span class="nn">random</span> <span class="kn">import</span> <span class="n">randint</span>

<span class="n">args</span> <span class="o">=</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">10</span><span class="p">,)</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">randint</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span>
<span class="k">while</span> <span class="n">x</span> <span class="o">!=</span> <span class="mi">6</span><span class="p">:</span>
    <span class="n">x</span> <span class="o">=</span> <span class="n">randint</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">)</span>
</pre>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="python.rst">python.rst</a>
            </aside>
            
            <aside class="page_number">
              4/5
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: python.rst -->
      <div class="slide-wrapper">
        <div class="slide">
          <div class="inner">
            
            <header><h1>ありがとうございました</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="python.rst">python.rst</a>
            </aside>
            
            <aside class="page_number">
              5/5
            </aside>
          </footer>
        </div>
      </div>
      
    </div>
  </div>
  
  <div id="toc" class="sidebar hidden">
    <h2>Table of Contents</h2>
    <table>
      <caption>Table of Contents</caption>
      
      <tr id="toc-row-1">
        <th><a href="#slide1">Python</a></th>
        <td><a href="#slide1">1</a></td>
      </tr>
      
      
      <tr id="toc-row-2">
        <th><a href="#slide2">If</a></th>
        <td><a href="#slide2">2</a></td>
      </tr>
      
      
      <tr id="toc-row-3">
        <th><a href="#slide3">For</a></th>
        <td><a href="#slide3">3</a></td>
      </tr>
      
      
      <tr id="toc-row-4">
        <th><a href="#slide4">While</a></th>
        <td><a href="#slide4">4</a></td>
      </tr>
      
      
      <tr id="toc-row-5">
        <th><a href="#slide5">ありがとうございました</a></th>
        <td><a href="#slide5">5</a></td>
      </tr>
      
      
    </table>
  </div>
  
  <div id="help" class="sidebar hidden">
    <h2>Help</h2>
    <table>
      <caption>Help</caption>
      <tr>
        <th>Table of Contents</th>
        <td>t</td>
      </tr>
      <tr>
        <th>Exposé</th>
        <td>ESC</td>
      </tr>
      <tr>
        <th>Full screen slides</th>
        <td>e</td>
      </tr>
      <tr>
        <th>Presenter View</th>
        <td>p</td>
      </tr>
      <tr>
        <th>Source Files</th>
        <td>s</td>
      </tr>
      <tr>
        <th>Slide Numbers</th>
        <td>n</td>
      </tr>
      <tr>
        <th>Toggle screen blanking</th>
        <td>b</td>
      </tr>
      <tr>
        <th>Show/hide slide context</th>
        <td>c</td>
      </tr>
      <tr>
        <th>Notes</th>
        <td>2</td>
      </tr>
      <tr>
        <th>Help</th>
        <td>h</td>
      </tr>
    </table>
  </div>
  <script>main()</script>
</body>
</html>