20
教 教教教 教教教 教 Scratch 2.0 教 Python 3.3 Renyuan Lyu 教教教 教教教教 教教教 1 http://scratch.mit.edu/users/ryTemp2014_001/ https://dl.dropboxusercontent.com/u/33089565/ry20 14_thinkcspy/html/_ryTest01.html

教 青少年 寫程式 從 Scratch 2.0 到 Python 3.3

  • Upload
    zavad

  • View
    240

  • Download
    0

Embed Size (px)

DESCRIPTION

教 青少年 寫程式 從 Scratch 2.0 到 Python 3.3. Renyuan Lyu 呂仁園 長庚大學,資訊系. http://scratch.mit.edu/users/ryTemp2014_001/ https://dl.dropboxusercontent.com/u/33089565/ry2014_thinkcspy/html/_ryTest01.html. ryCatStar00 ,貓咪之星. http://scratch.mit.edu/projects/20615907/. 主程式流程. 畫三角形 畫五邊形 畫多邊形 畫五星形 - PowerPoint PPT Presentation

Citation preview

Page 1: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

1

教 青少年 寫程式從 Scratch 2.0 到 Python 3.3

Renyuan Lyu呂仁園長庚大學,資訊系http://scratch.mit.edu/users/ryTemp2014_001/

https://dl.dropboxusercontent.com/u/33089565/ry2014_thinkcspy/html/_ryTest01.html

Page 2: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

2

ryCatStar00 ,貓咪之星• http://scratch.mit.edu/projects/20615907/

Page 3: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

3

• 主程式流程

Page 4: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

4

• 畫三角形• 畫五邊形• 畫多邊形• 畫五星形• 畫貓咪之星

Page 5: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

5

Page 6: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

6

rySolveEquation00 ,解 2 元 1 次方程式• http://scratch.mit.edu/projects/20607239/

Page 7: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

7

• 主程式流程

Page 8: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

8

• 輸入方程式係數a, b, c,e, f, g

Page 9: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

9

• 解 2 元 1 次方程式演算法,行列式計算。

Page 10: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

10

Page 11: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

11

ryArkanoid00 ,敲磚塊遊戲• http://scratch.mit.edu/projects/20604541/• http://scratch.mit.edu/projects/17662884/

Page 12: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

12

• 球拍 (Paddle) 、球 (Tennis Ball)

Page 13: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

13

• 磚塊 (block)

Page 14: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

14

• 失敗精靈、勝利精靈

Page 15: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

15

• Pong with High Score– http://scratch.mit.edu/projects/12778537/

• 由此延伸出去,看看別人如何寫程式。• http://scratch.mit.edu/projects/12778537/remixes

Page 16: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

16

Page 18: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

18

CPU, RAM, HardDisk

• Computer Components– https://www.youtube.com/watch?v=rK3YxmkarIg

– In this section you learn a little about the architecture of a computer and some general terms to use when talking about computer programs. This includes:• CPU - Central Processing Unit• RAM - Random Access Memory• Hard Drive - A Persistent Storage Device

Page 19: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

19

Python 程式語言很簡單

• https://dl.dropboxusercontent.com/u/33089565/ry2014_thinkcspy/html/_ryTest01.html

• 列出 99 乘法表• 列出 100 以內的質數• 求二元一次方程式的解• 小烏龜

Page 20: 教 青少年 寫程式 從  Scratch 2.0 到  Python 3.3

20

Hello, little turtles!嗨,小烏龜!• https://dl.dropboxusercontent.com/u/330895

65/ry2014_thinkcspy/html/hello_little_turtles.html

from turtle import *

def main(): mode("logo") speed(10) shape("arrow") pensize(3) circle(66) rt(180) circle(66) pu() lt(90) fd(33) rt(90) ….