スマホでTermuxを使ってプログラミングしているんだが、turtleライブラリでグラフィックスを描画しようとしてバタバタしたので覚え書き。 CUIであるTermuxでどうやってグラフィックスを描画するのか CUIとは「Command line User Interface」の略である。 CUI こんな風に ...
みなさんはPythonの「turtle(タートル)」という機能を知っていますか? これは、画面上のカメ(turtle)を動かして線を描くことで、さまざまな形や模様を作ることができるプログラミングツールです。 タートルは「前に進む」「右に曲がる」などの簡単な ...
forward(200) # Move forward in the current direction. write(str(heading()), font=('Arial', 12, 'normal')) # Write the degrees of the direction. backward(200) # Move back to the center. left(15) # Turn ...