迴圈(Loops)重複執行某些動作直到條件不成立。
# 範例 1:走到牆前 while not wall_in_front(): move() # 範例 2:撿起所有物品 while object_here(): take() # 範例 3:走到底並每格放一個物品 while not wall_in_front(): put() move()
Copyright © All rights reserved | This template is made with by Colorlib