Microsoft PowerPoint - Raptor-FlowChart-scy.pptx

Similar documents
(Microsoft Word - Motion Program \270\305\264\272\276\363 \307\245\301\366 \271\327 \270\361\302\367.doc)

CC213

2/80 2

四川省普通高等学校

( CIP) /. :, ( ) ISBN TP CIP ( 2005) : : : : * : : 174 ( A ) : : ( 023) : ( 023)

Microsoft Word - C-pgm-ws2010.doc

(京)新登字063号

C/C++ 语言 - 循环

Microsoft PowerPoint - Lecture7II.ppt

Python a p p l e b e a r c Fruit Animal a p p l e b e a r c 2-2

FILTRON 1. DC AC AC 220V 50HZ / / / / 4. 1) / DC AC FILTRON DC AC FILTRON DC 12V 12VDC D

关于快速直达轨道轿车公交体系的研究及可行性

三維空間之機械手臂虛擬實境模擬

Microsoft PowerPoint - OPVB1基本VB.ppt

epub83-1

LK110_ck

Spyder Anaconda Spyder Python Spyder Python Spyder Spyder Spyder 開始 \ 所有程式 \ Anaconda3 (64-bit) \ Spyder Spyder IPython Python IPython Sp

C/C++语言 - 分支结构

ebook70-7

untitled


CC213

PowerPoint 簡報

nooog

Microsoft Word - 09.數學 docx

Ps22Pdf

C/C++语言 - C/C++数据

甄試報告1125.PDF

区 域 活 动 进 入 中 班 我 们 区 域 的 设 置 和 活 动 材 料 都 有 所 变 化, 同 时 也 吸 引 孩 子 们 积 极 的 参 与 学 习 操 作 区 的 新 材 料 他 们 最 喜 欢, 孩 子 们 用 立 方 块 进 行 推 理 操 作 用 扑 克 牌 进 行 接 龙 游

ebook45-5

圖 1. 手 工 搭 棚 [ 與 PCB 印 刷 電 路 板 PCB 除 了 電 路 之 外, 也 放 置 各 種 電 子 零 件 如 圖 2 所 示, 電 子 零 件 與 PCB 的 接 合 方 式 有 二 : 插 件 式 (Pin Through Hole, PT

()

Visual C# 2005程式設計

Open topic Bellman-Ford算法与负环

C

Microsoft Word 軟體設計第二部份範例試題_C++_ _1_.doc

FIT1改1.FIT)

Microsoft Word - 平版油墨物質安全資料表.doc

TX-NR3030_BAS_Cs_ indd

可 以 查 看 Android 版 打 地 鼠 游 戏 的 视 频 教 程 此 教 程 由 Wolber 教 授 基 于 上 一 个 版 本 的 App Inventor 录 制 的, 但 同 样 可 以 有 助 于 理 解 开 发 过 程 图 3-1 打 地 鼠 游 戏 的 用 户 界 面 学 习


穨matlab教學範例ccc.doc

Microsoft Word - InoTouch Editor编程软件手册 doc

中華民國 第51屆中小學科學展覽會

06 01 action JavaScript action jquery jquery AJAX CSS jquery CSS jquery HTML CSS jquery.css() getter setter.css('backgroundcolor') jquery CSS b

彩圖 6 彩圖 7 彩圖 8 3

第一章.doc

6寸PDF生成工具

第一章

穨control.PDF

考 研 数 学 三 部 曲 之 大 话 高 等 数 学 0. 考 研 数 学 高 等 数 学 部 分 其 实 就 是 一 座 大 楼 房 间 80 房 间 80 第 八 层 房 间 80 房 间 804 房 间 805 房 间 70 房 间 70 房 间 70 第 七 层 房 间 704 房 间 7

2. Can a wire be used to pass data between loops that are intended to run in parallel? a. Yes b. No 正 确 答 案 : B 分 析 : 一 般 使 用 Local Variable 或 者 Queue

ebook8-30

Simulator By SunLingxi 2003

穨怎樣用電腦打出一分物理試題.PDF

科学计算的语言-FORTRAN95

Microsoft Word - 3D手册2.doc

Hella LED 前燈 日行燈 Hella

山东建筑大学学分制管理规定(试行)

( 表 1) 學 校 基 本 資 料 學 校 類 型 新 竹 市 東 區 新 竹 國 小 班 級 數 55 校 址 新 竹 市 興 學 街 106 號 電 話 傳 真 網 址

接线端子--Connectors规格书.doc

第三节 软件测试的过程与策略

台北市立大安高工職業學校

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

36 N G 04 犱 犫犮 X, 犐 (, β ) () 犫 ) ( 犮 犱 ) β * 6 B, 犐 (, β ) 犮 β 犐 (, β )], ( 犮 ) β ( 犫 ) β ( 犮 犱 ) ( 犮 ) β 犐 (, β ), *,,, X, 犐 (, 犮 β ) β ( 犮 犱 ) β (

我 沒 上 過 凸 台 因 為 害 怕 受 傷, 平 日 練 習 就 跑 的 比 別 人 慢, 根 本 不 存 在 神 腿 所 言 的 困 惑 ~ 放 慢 速 度 的 勇 氣 五 年 過 去 了, 跑 完 這 場, 就 再 也 不 跑 了, 是 我 對 家 人 的 承 諾 但 是 想 當 然 爾,

VHDL(Statements) (Sequential Statement) (Concurrent Statement) VHDL (Architecture)VHDL (PROCESS)(Sub-program) 2

untitled

Microsoft PowerPoint - ds-1.ppt [兼容模式]

Adobe® Flash® 的 Adobe® ActionScript® 3.0 程式設計

新・明解C言語入門編『索引』

untitled

Microsoft Word - 小心翼翼的二十一點N.doc

lim f(x) lim g(x) 0, lim f(x) g(x),

untitled

untitled

Java

untitled

例 度 讀 讀 不 不 來 念 來 了 讀 不 不 讀 不 讀行 利 了 說 更 了 讀

2007

SA-DK2-U3Rユーザーズマニュアル

Microsoft Word - ch04三校.doc

03243AA_CH05.indd

untitled

Microsoft Word 选题

影視後製全攻略 Premiere Pro After Effects Encore 自序 Adobe Premiere Pro After Effects Encore 2008 Adobe CS Adobe CS5 Adobe CS4 Premiere Pro After Effect

wedding calendar

Microsoft Word - 01.DOC

软件测试(TA07)第一学期考试

DR2010.doc

图形1

使用SQL Developer

Microsoft Word - PHP7Ch01.docx

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與

2014年大学生村官考试公共基础知识:社会革命和社会改革

朝陽科技大學八十八學年度招考碩士班簡章目錄

untitled

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

pair path pair path numeric sind cosd pair color beginfig(0) u := 2cm ; pair a ; draw ( 0u, 0u ) -- ( u, u ) ; draw ( u, 0u ) -- ( 0u, 1u ) ;

Transcription:

流程圖 if 流程 X>10 Raptor http://raptor.martincarlisle.com/ Raptor flow chart 1 if else 流程 x>y Raptor flow chart 2

練習 寫一個程式, 輸入西元年份 yy, 輸出該年是否閏年 yy is divisible by 400 yy is divisible by 4 but (not divisible by 100) Raptor flow chart 3 Switch Case 概念 mm... Raptor flow chart 4

switch 流程 mm=1 days = 31 break mm=2 days = 28 break default 練習 : 處理整數成績 Raptor flow chart 5 for 流程 i=0 i<10 i++ 練習 : 計算 1 到 100 的偶數和 Raptor flow chart 6

while 流程 i=0 i<10 i++ Raptor flow chart 7 do while 流程 i=0 i++ i<10 Raptor flow chart 8

關於迴圈 (Loops) 迴圈之基本要素 控制變數初值設定 檢驗條件 控制變數改變 三種迴圈敘述之不同 常見錯誤 Off by one ( 少一次 ) 無窮迴圈 迴圈與執行效率 練習 寫一程式, 要求使用者不斷輸入及 Echo 學生成績, 直到輸入為負時為止 印出學生總人數及平均成績 Raptor flow chart 9 結構化程式 goto Raptor flow chart 10

虛擬 / 偽代碼 (Pseudo Code) 幫助思考程式流程 沒有程式語言正式, 省略細節, 易寫易懂 限定使用結構化程式流程控制, 容易以程式語言改寫 較流程圖方便 紙筆追蹤測試 (Tracing an algorithm) Raptor flow chart 11 Euclid 輾轉相除法 輸入正整數 a & b 只要 ( b <> 0 ) { r = a b 後的餘數 ; a = b; b = r; } gcd = a; 測試數據 1: a=12, b=56 2: a=120, b=18 3: a=105, b=13 4: a=356, b=220 5: a=2136, b=3312 練習 :1+2+...+n <= limit Raptor flow chart 12

練習 : 判斷是否質數的篩檢法 要判斷 x 是否質數, 可用 d (2... x), 逐一檢查是否能整除 x 如果都不能整除,x 便是質數, 否則 x 就不是質數 函式 isprime(x) 印出 1 到 100 的所有質數 Raptor flow chart 13 Raptor: Flowchart programming 輸出 Adding block / symbols 變數 Raptor Flowchart 14

Enter an statement x 0 Raptor Flowchart 15 Create output symbol 輸入 scanf 輸出 printf 選擇 if, switch 廻路 for, while Raptor Flowchart 16

Running 執行 速度 大小 Raptor Flowchart 17 Add Toggle breakpoint Raptor Flowchart 18

Generate 3GL (C++/C#) Generate executable file Raptor Flowchart 19 練習 :Digital Clock Raptor flow chart 20

Graphic window opening and closing procedures Open_Graph_Window( X_Size, Y_Size ) Close_Graph_Window Set_Window_Title("Title") Drawing procedures Put_Pixel( X, Y, Color ) Draw_Line( X1, Y1, X2, Y2, Color ) Draw_Box( X1, Y1, X2, Y2, Color, Filled/Unfilled ) Draw_Circle( X, Y, Radius, Color, Filled/Unfilled ) Draw_Ellipse( X1, Y1, X2, Y2, Color, Filled/Unfilled ) Draw_Arc( X1, Y1, X2, Y2, StartX, StartY, EndX, EndY, Color ) Clear_Window( Color ) Flood_Fill( X, Y, Color ) Display_Text( X, Y, String Expression, Color ) Display_Number( X, Y, Number Expression, Color ) Freeze_Graph_Window Update_Graph_Window UnFreeze_Graph_Window Graphic window "size" functions Get_Max_Width Get_Max_Height Get_Window_Width Get_Window_Height Raptor flow chart 21 Keyboard input procedure Wait_For_Key procedure call Delay_for(0.2) // 0.2 sec Clear_Console Draw_Circle(X, Y, 7, Blue) Mouse input procedures Wait_for_Mouse_Button( Button ) Get_Mouse_Button( Button, X, Y ) Mouse input functions Mouse_Button_Pressed( Button ) Mouse_Button_Released( Button ) Get_Mouse_X Get_Mouse_Y Keyboard input functions Key_Hit Get_Key // ASCII Get_Key_String Is_Open To_Character (n) To_ASCII (ch) Redirect_Input ("file.txt") Redirect_Input (True) Redirect_Input (False) Redirect_Output ("file.txt") Redirect_Output (False) Raptor flow chart 22

Function Basic math: sqrt, log, abs, ceiling, floor Trigonometry: sin, cos, tan, cot, arcsin, arccos, arctan, arccot Miscellaneous: Length_Of, Random Draw_Bitmap( Load_Bitmap("abc.bmp"),x,y,w,h) Mouse input procedures Wait_for_Mouse_Button( Button ) Get_Mouse_Button( Button, X, Y ) Mouse input functions Mouse_Button_Pressed( Button ) Mouse_Button_Released( Button ) Get_Mouse_X Get_Mouse_Y Sound Play_Sound(wav) Play_Sound_Background("snd.wav") Play_Sound_Background_Loop("snd.wav") Raptor flow chart 23 Graphics window query function color = Get_Pixel ( X, Y ) Set_Font_Size(Size) Get_Font_Height Get_Font_Width Random_Color //0 15 Random_Extended_Color //0-241 Closest_Color (R,G,B) //0-255 Draw_Bitmap (Bitmap, X, Y, W, H) Get_Pixel Returns 0 for Black, 1 for Blue,, 16 for White RAPTORGraph Colors Black, Blue, Green, Cyan, Red, Magenta, Brown, Light_Gray, Dark_Gray, Light_Blue, Light_Green, Light_Cyan, Light_Red, Light_Magenta, Yellow, White How to animate an object in RAPTORGraph Place the following inside of a loop Draw an object relative to an X,Y point with the drawing procedures Delay_For some small time period Draw the object again in white (i.e. erase it) Update the X,Y point where you are drawing by some small offset Raptor flow chart 24