本研究旨在深入探討在程式設計學習中,使用流程圖提示是否優於文字描述提示,能夠提升學生的學習成效,為了達成這個目的,我們選擇使用基於GenAI的程式提示系統,其名為PyPrompter,並對此系統進行了優化。 首先透過GenAI結合Mermaid語法,將原本系統提供的文字描述提示改為直觀的流程圖提示,為了評估流程圖提示的品質,我們引入了標準化程式流程圖搭配最短路徑圖核(SCFC-SPGK)演算法來評估流程圖的品質。實驗結果顯示,使用流程圖提示的學生相較於使用文字提示的學生學習成效有顯著的提升。這些發現不僅為生成式人工智慧在程式設計教育的應用提供了具體案例,同時也強調了在學習工具中整合視覺化提示的重要性,來進一步提升學生的理解和應用能力。 本研究在實際應用中驗證了GenAI生成流程圖提示的有效性,這個結果為未來程式設計教育工具的開發和優化提供了有價值的參考,我們期許這項研究能夠推動程式設計教育的進一步發展,同時激發更多探討視覺化提示在學習工具中應用的相關研究。;This study aims to investigate whether the use of flowchart prompts is superior to text description prompts in programming education, leading to improved learning outcomes for students. To achieve this purpose, we chose to utilize the GenAI-based code prompting system named PyPrompter and optimized it. Firstly, by integrating GenAI with Mermaid syntax, we changed the text description prompts originally provided by PyPrompter into intuitive flowchart prompts. To evaluate the quality of the flowchart prompts, we introduced the Standardized Code Flowchart with the Shortest Path Graph Kernel (SCFC-SPGK) algorithm to assess the quality of the flowcharts. Experimental results show that students who use flowchart prompts have significantly improved learning outcomes compared with students who use text prompts. These findings not only provide specific cases for the improvement of programming education, but also emphasize the importance of integrating visual prompts into learning tools to further enhance students′ understanding and application abilities. This study has verified the effectiveness of GenAI in generating flowchart prompts in practical applications. This result provides a valuable reference for the development and optimization of future programming education tools. We hope that this research can promote the further development of programming education. It also stimulates more research on the application of visual cues in learning tools.