たのしいプログラミング Pythonではじめよう!



Similar documents
Step2 入門





P.1~18

I

Microsoft Word - 51プログラム名簿目次070913w.doc

Rubyのしくみ:Ruby Under a Microscope

01_SWGuide_V8.50.fm

Javaと.NET

目次情報

学習内容と日常生活との関連性の研究-まえがき・概要・目次

パソコン機能ガイド

パソコン機能ガイド

困ったときのQ&A

I

™…

MultiPASS B-20 MultiPASS Suite 3.10使用説明書

ii

SPP24_Program_WOC(J)-15

Copyright SATO International All rights reserved. This software is based in part on the work of the Independen

untitled

活用ガイド (ハードウェア編)

困ったときのQ&A

2004年度日本経団連規制改革要望

困ったときのQ&A

ITR Market View:アイデンティティ/アクセス管理市場2018目次

OFISTAR H7000ファクス編(2版 )

『保守の比較政治学』

vi アハ ート2 アハ ート3 アハ ート4 アハ ート5 アハ ート6 アハ ート7 アハ ート8 アハ ート9 アハ ート10 アハ ート11 アハ ート12 アハ ート13 アハ ート14 アハ ート15 アハ ート16 アハ ート17 アハ ート18 アハ ート19 アハ ート20 アハ

レーザビームプリンタ Satera ユーザーズガイド

C ontents VI VII


はしがき・目次・事例目次・凡例.indd

MultiPASS Suite 3.20 使用説明書

II

ユーザーズガイド

SR-53V[接続編]

橡6.プログラム.doc

Color MultiWriter 9900C/9800C ユーザーズマニュアル

VB-C50i/VB-C50iR 使用説明書

ITR Market View:ECサイト構築/決済代行/CMS/SMS送信市場2018目次

リファレンス

ChartPattern13

活用ガイド (ソフトウェア編)


PHP4徹底攻略 改訂版


エクセルカバー入稿用.indd


01_.g.r..

ITR Market View:RPA/OCR/BPM市場2018目次

ITR Market View:情報漏洩対策市場2017目次

SC-85X2取説


<4D F736F F F696E74202D C835B B E B8CDD8AB B83685D>

困ったときのQ&A

名刺ファイリングOCR ユーザーズガイド

13

活用ガイド (ソフトウェア編)

untitled

untitled

- 2 Copyright (C) All Rights Reserved.

i

ネットワークビデオレコーダー VK-64/VK-16/VK-Lite v2.2 セットアップガイド

...h.book

これわかWord2010_第1部_ indd

パワポカバー入稿用.indd

これでわかるAccess2010

ITR Market View:クラウド・コンピューティング市場2018目次

III


平成18年版 男女共同参画白書

2

untitled

i


PX-504A

初等協会5

PX-434A/PX-404A

EP-704A


レーザビームプリンタ Satera ユーザーズガイド


LASER SHOT LBP-1210 ユーザーズガイド

ES-D400/ES-D350

相続支払い対策ポイント

150423HC相続資産圧縮対策のポイント

ハピタス のコピー.pages

Copyright 2008 All Rights Reserved 2


はがきファイリングOCR V1.1 ユーザーズガイド

LBP-350 ユーザーズガイド

AP-50W[導入編]

imageWARE Prepress Manager Select エディターガイド

* * * ** ** ** * ** * ** * ** * ** * ** ** * * ** * ** *** **** * ** * * * ** * * ** *** **** * * * * * * * * * * ** * * ** * ** ix

CleanMyMac Copyright 2013 MacPaw Inc. All rights reserved.

LBP-1810 LIPS機能ガイド

PX-B750F

Transcription:

Title of English-language original: Python for Kids A Playful Introduction to Programming ISBN 978-1-59327-407-8, published by No Starch Press, Inc. Copyright 2013 by Jason R. Briggs. Japanese-language edition copyright 2014 by Ohmsha, Ltd. All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording or by any information storage retrieval system, without permission from No Starch Press, Inc. Python E-mail shoseki@ohmsha.co.jp

Web PC Python Python iii

iv Python Python Python Python http://www.ohmsha.co.jp/data/link/978-4-274-06944-4/ Python for Kids 10 11 14 15 18 Python Python 2014 2

v Python Scheme Haskell TeX

Python Python 1 Python Python 1960 Logo Python turtle tkinter Tk GUI 1 vii

viii 1. 2. Python Python 1 Python if for Python tkinter Python IDLE 2 IDLE 2 Integrated DeveLopment Environment

ix IDLE IDLE IDLE 1 Python 2 3 Python 4 turtle 5 if 6 for while 7 8 9 Python 10 Python 11 turtle 12 tkinter 13 14 Bounce! 15 18 PyGame Python

x No Starch Bill Pollock Bill Serena Yang 300 Miran Lipovača Josh Maria 1970

xi iii vii I 1 1 3 1.1... 4 1.2 Python... 4 1.3 Python... 10 1.4... 11 1.5... 13 2 15 2.1 Python... 15 2.2... 18 2.3... 20 2.4... 22

xii 3 23 3.1... 23 3.2... 29 3.3... 34 3.4 Python... 34 3.5... 36 3.6... 37 4 39 4.1 Python turtle... 39 4.2... 46 4.3... 46 5 if else 47 5.1 if... 47 5.2 if else... 51 5.3 if elif... 52 5.4... 53 5.5 None... 53 5.6... 54 5.7... 56 5.8... 56 6 59 6.1 for... 59

6.2... 65 6.3... 67 6.4... 67 xiii 7 69 7.1... 70 7.2... 73 7.3... 75 7.4... 76 8 77 8.1... 78 8.2... 86 8.3... 88 8.4... 89 8.5... 90 9 Python 91 9.1... 91 9.2... 101 9.3... 105 9.4... 106 10 107 10.1 copy... 108

xiv 10.2 keyword... 110 10.3 random... 111 10.4 sys Python... 113 10.5 time... 115 10.6 pickle... 118 10.7... 119 10.8... 120 11 121 11.1... 121 11.2... 122 11.3... 125 11.4... 127 11.5... 129 11.6... 130 11.7... 132 11.8... 133 11.9... 134 12 tkinter 135 12.1... 136 12.2... 138 12.3... 139 12.4... 139 12.5... 140 12.6... 147

12.7... 148 12.8... 150 12.9... 151 12.10... 152 12.11... 154 12.12... 156 12.13... 157 12.14... 158 xv II Bounce! 159 13 Bounce! 161 13.1... 161 13.2... 162 13.3... 163 13.4... 165 13.5... 169 14 Bounce! 171 14.1... 171 14.2... 176 14.3... 179 14.4... 179

xvi III 181 15 183 15.1... 184 15.2 GIMP... 184 15.3... 186 15.4... 191 16 193 16.1 Game... 193 16.2... 197 16.3... 197 16.4... 202 16.5... 203 16.6... 205 16.7... 206 17 207 17.1... 207 17.2... 210 17.3... 211 17.4... 211 17.5... 212

18 213 18.1... 213 18.2... 224 18.3... 225 18.4... 227 18.5... 232 18.6... 232 xvii 233 Python 239 249 253

I

1 1 DVD 1 3

4 1 1.1 Pascal Ada BASIC FORTRAN TV Python Python python NOTE 1970 Python Python Python { } # $ Python 1.2 Python Python Windows 7 Mac OS X Ubuntu Python IDLE Integrated DeveLopment Environment Python Python 10 Python

Windows 7/8 Python 1.2 Python 5 Microsoft Windows 7 8 Python http://www. python.org Python 3 Windows Downloads Download for Windows. I NOTE Python 3 Python Windows 1. Install for All Users Next 2. C:Y=Python32 C:Y=Python33 Next 3. Next

6 1 Python 3. Python 3 1. 2. Y=Python32 c:y=python33y=liby=idleliby=idle.pyw -n

1.2 Python 7 3. 4. IDLE 10 Python Python Mac OS X Python Mac Python http://www.python.org/getit/ Mac Mac Mac OS X OS Mac Mac OS X 10.5 32-bit i386/ppc Python 3 10.6 64-bit 32-bit x86-64 Python 3.dmg. I Python.mpkg Python IDLE 1. Spotlight 2. Automator

第1章 8 蛇 絵 3. 表示 4. Automator 起動 次 進 一覧 5. 選択 6. 中 実行 以下 cat 7. 部分 選択 探 空 書 以下 変更 open -a "/Applications/Python 3.2/IDLE.app" --args -n Python 3.2 部分 合 Python 変更 8. 保存 選択 IDLE 入力 名前

1.2 Python 9 9. 10 Python Python Ubuntu Python Ubuntu Linux Python Python 3 Ubuntu 12.x 1. Ubuntu Software Center Software 2. Software Center Python 3. IDLE IDLE (using Python-3.2). I 4. Install 5. Authenticate NOTE Ubuntu Python(v3.2) OK

10 1 Python 1.3 Python Windows Mac OS X IDLE Ubuntu Applications Programming IDLE (using Python 3.2) Python IDLE >>> >>> print("hello World") "..Enter >>> print("hello World") Hello World >>>

1.4 11 Python Python print Python Hello World 1.4 Python 10 IDLE File New File *Untitled* Python Python. I print("hello World")

12 1 File Save hello.py Run Run Module Python hello.py Run Run Module Python Python Run Python Shell hello.py Windows Python Hello World