cp2025 計算機程式

  • Home
    • SMap
    • reveal
    • blog
  • About
    • cs101
    • Computer
      • llama
      • nginx
    • AI
      • QandA
      • Teams
    • Homework
  • Topics
    • Git
      • Git_ex1
      • Git_ex2
    • Python
      • SE
      • CL
      • Loops
      • Recursion
      • SA
      • SST
      • Maze
      • Collect
      • GT
      • Python_ex1
    • Javascript
      • HTML and CSS
    • Project
      • Waitress
      • API
  • Brython
    • Brython_ex
    • Robot_ex
  • Ref
    • Reeborg
      • ex1
      • Otto_ninja
    • tkinter
    • Pyodide
    • Pyodide_ex
    • Pyodide2
      • robot.py
      • Example2
    • Pyodide3
      • png_files
      • Harvest
Python << Previous Next >> CL

SE

順序控制 (Sequential Execution)

最基本的程式執行方式,命令依序執行。

# 範例 1:向前走三步
move()
move()
move()

# 範例 2:走一步後左轉
move()
turn_left()

# 範例 3:走一步、撿物品、左轉
move()
take()
turn_left()

Python << Previous Next >> CL

Copyright © All rights reserved | This template is made with by Colorlib