Python 入門指南 5.0

exercise4210.html

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html>
<head>
    <!-- 設定網頁編碼 -->
    <meta charset="utf-8">
    <!-- 設定標題列文字 -->
    <title>Brython 練習</title>
    <!-- 引入 Brython 程式庫 -->
    <script src="https://cdn.jsdelivr.net/npm/brython@3/brython.min.js">
    </script>
    <script src="https://cdn.jsdelivr.net/npm/brython@3/brython_stdlib.js">
    </script>
    <!--  引入 CSS 檔案 -->
    <link href="exercise4201.css" rel="stylesheet" type="text/css"/>
    <!-- 引入自行定義的 Python 程式 -->
    <script type="text/python" src="exercise1810.py">
    </script>
    <script type="text/python" src="exercise1812.py">
    </script>
    <script type="text/python" src="exercise2901.py">
    </script>
    <script type="text/python" src="exercise2902.py">
    </script>
    <script type="text/python" src="exercise2903.py">
    </script>
    <script type="text/python" src="exercise2807.py">
    </script>
    <script type="text/python" src="exercise2605.py">
    </script>
    <script type="text/python" src="exercise2809.py">
    </script>
    <script type="text/python" src="exercise2906.py">
    </script>
    <script type="text/python" src="exercise4410.py">
    </script>
</head>

<body id="body" onload="brython()">
    <h1>鬥獸棋</h1>
    
    <p id="display">
    </p>
    
    <table>
        <tr>
            <td class="cal3"> </td>
            <td class="cal2"><input type="button" id="button_up" value="上" /></td>
            <td class="cal3"> </td>
        </tr>
        <tr>
            <td class="cal3"><input type="button" id="button_left" value="左" /></td>
            <td class="cal2"> </td>
            <td class="cal3"><input type="button" id="button_right" value="右" /></td>
        </tr>
        <tr>
            <td class="cal3"> </td>
            <td class="cal2"><input type="button" id="button_down" value="下" /></td>
            <td class="cal3"> </td>
        </tr>
    </table>
    
    <p>
        <input type="button" id="run" value="進行遊戲" />
    </p>
            
    <div class="back"><a href="exercise4202.html">回目錄頁</a></div>
</body>
</html>

<!-- 檔名: exercise4210.html
     說明:《Python入門指南》的範例程式
     網站: http://kaiching.org
     作者: 張凱慶
     時間: 2023 年 12 月  -->

回到練習題目
上一頁 exercise4209.html
回 Python 入門指南 5.0 首頁
下一頁 exercise4301.html
回 Python 教材首頁
回程式語言教材首頁