๋กœ๋ด‡๊ต์œก/2ํšŒ์ฐจ_ํŒŒ์ด์ฌ

[ํ„ฐํ‹€ ๊ทธ๋ž˜ํ”ฝ] ๊ธ€์ž ์“ฐ๊ธฐ

SSEM๐Ÿ‘Œ 2022. 1. 11. 21:13

1. ๊ธ€์ž ์“ฐ๊ธฐ

  • write() : ๋ฌธ์ž์—ด์„ ํ™”๋ฉด์— ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น
  • turtle.write(arg, move=False, align ="left", font=("Arial", 8, "normal")

     - arg : TurtleScreen์— ์“ธ ๊ธ€์ž

     - move : ์ด๋™ (True / False), ์ƒ๋žต ๊ฐ€๋Šฅ

     - align : ์ •๋ ฌ "left", "center", "right", ์ƒ๋žต ๊ฐ€๋Šฅ

     - font : ํฐํŠธ (fontname, fontsize, fonttype)

 

์˜ˆ์ œ ์†Œ์Šค(27-write.py)
import turtle as t

t.hideturtle()

t.write("์•ˆ๋…• ํŒŒ์ด์ฌ", move=False, align="center", font=("arial",50,"bold"))

t.penup()
t.sety(-100)
t.pendown()

t.write("Hello Python", move=False, align="center", font=("Freestyle Script",50,"normal"))

 

 

 

์‹ค์Šต1) ๋‚ด ์ด๋ฆ„์„ ์จ ๋ณด์„ธ์š”.