import turtle as timport math# 設置速度t.speed(100) # 速度t.delay(10) # 延遲# turtle.tracer(False)# 雙耳# 左耳t.penup()t.goto(-150, 200)t.setheading(160)t.begin_fill()t.pendown()t.circle(-30, 230)t.setheading(180)t.circle(37, 90)t.end_fill()# 右耳t.penup()t.goto(60, 200)t.setheading(20)t.begin_fill()t.pendown()t.circle(30, 230)t.setheading(0)t.circle(-37, 90)t.end_fill()# 頭t.pensize(5)t.penup()t.goto(-113, 237)t.setheading(30)t.pendown()t.circle(-134, 60)t.penup()t.goto(-150, 200)t.setheading(-120)t.pendown()t.circle(200, 80)t.penup()t.goto(60, 200)t.setheading(-60)t.pendown()t.circle(-200, 80)t.penup()t.setheading(210)t.pendown()t.circle(-120, 60)# 雙眼# 左眼# 眼圈t.penup()t.goto(-140, 100)t.setheading(-45)t.begin_fill()t.pendown()a = 0.2for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.1 t.lt(3) # 向左轉3度 t.fd(a) # 向前走a的步長 else: a = a - 0.1 t.lt(3) t.fd(a)t.end_fill()# 眼白t.fillcolor("white")t.penup()t.goto(-103, 125)t.setheading(0)t.begin_fill()t.pendown()t.circle(13, 360)t.end_fill()# 眼珠t.fillcolor("sienna")t.pencolor("sienna")t.penup()t.goto(-102, 133)t.setheading(0)t.begin_fill()t.pendown()t.circle(5, 360)t.end_fill()# 右眼# 眼圈t.penup()t.goto(50, 100)t.setheading(45)t.fillcolor("black")t.pencolor("black")t.begin_fill()t.pendown()a = 0.2for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.1 t.lt(3) # 向左轉3度 t.fd(a) # 向前走a的步長 else: a = a - 0.1 t.lt(3) t.fd(a)t.end_fill()# 眼白t.fillcolor("white")t.penup()t.goto(13, 125)t.setheading(0)t.begin_fill()t.pendown()t.circle(13, 360)t.end_fill()# 眼珠t.fillcolor("sienna")t.pencolor("sienna")t.penup()t.goto(12, 133)t.setheading(0)t.begin_fill()t.pendown()t.circle(5, 360)t.end_fill()# 鼻子t.pencolor("black")t.fillcolor("black")t.penup()t.goto(-55, 133)t.begin_fill()t.pendown()t.fd(20)t.seth(-120)t.fd(20)t.seth(120)t.fd(20)t.end_fill()# 嘴t.penup()t.goto(-70, 110)t.setheading(-30)t.fillcolor("red")t.begin_fill()t.pendown()t.circle(50, 60)t.setheading(-120)t.circle(-100, 15)t.circle(-15, 90)t.circle(-100, 15)t.end_fill()# 四肢# 左臂t.penup()t.goto(-175, 100)t.fillcolor("black")t.begin_fill()t.setheading(-120)t.pendown()t.fd(100)t.setheading(-110)t.circle(20, 180)t.fd(30)t.circle(-5, 160)t.end_fill()# 右臂t.penup()t.goto(85, 100)t.setheading(60)t.begin_fill()t.pendown()t.fd(100)t.setheading(70)t.circle(20, 180)t.fd(30)t.circle(-5, 160)t.end_fill()# 小紅心t.penup()t.pencolor("red")t.fillcolor('red')t.goto(105, 200)t.begin_fill()t.pendown()t.circle(-5, 180)t.setheading(90)t.circle(-5, 180)t.setheading(-120)t.fd(17)t.penup()t.goto(105, 200)t.pendown()t.setheading(-60)t.fd(17)t.end_fill()t.pencolor("black")t.fillcolor("black")# 左腿t.penup()t.goto(-120, -45)t.begin_fill()t.pendown()t.setheading(-90)t.circle(-140, 20)t.circle(5, 109)t.fd(30)t.circle(10, 120)t.setheading(90)t.circle(-140, 10)t.end_fill()# 右腿t.penup()t.goto(30, -45)t.begin_fill()t.pendown()t.setheading(-90)t.circle(140, 20)t.circle(-5, 109)t.fd(30)t.circle(-10, 120)t.setheading(90)t.circle(140, 10)t.end_fill()# 冰糖外殼t.pensize(1)t.penup()t.goto(-160, 195)t.setheading(160)t.pendown()t.circle(-40, 230)t.setheading(30)t.circle(-134, 58)t.setheading(60)t.circle(-40, 215)t.setheading(-60)t.fd(15)t.circle(2, 200)t.setheading(65)t.fd(30)t.circle(-25, 180)t.fd(100)t.circle(2, 25)t.circle(-200, 47)t.circle(2, 60)t.circle(140, 23)t.circle(-2, 90)t.setheading(180)t.fd(70)t.circle(-2, 90)t.fd(30)t.setheading(-160)t.circle(-100, 35)t.setheading(-90)t.fd(30)t.circle(-2, 90)t.fd(70)t.circle(-2, 90)t.setheading(60)t.circle(140, 30)t.circle(2, 45)t.circle(-200, 19)t.circle(2, 130)t.fd(30)t.circle(-25, 180)t.fd(100)t.setheading(90)t.circle(-200, 30)# 冰糖面罩t.pensize(3)t.penup()t.goto(65, 120)t.setheading(90)t.pendown()t.pencolor("red")a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: # 控制a的變化 a = a + 0.25 t.lt(3) # 向左轉3度 t.fd(a) # 向前走a的步長 else: a = a - 0.25 t.lt(3) t.fd(a)t.pencolor("orange")t.penup()t.goto(66, 120)t.pendown()a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.255 t.lt(3) t.fd(a) else: a = a - 0.255 t.lt(3) t.fd(a)t.pencolor("green")t.penup()t.goto(67, 120)t.pendown()a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.2555 t.lt(3) t.fd(a) else: a = a - 0.2555 t.lt(3) t.fd(a)t.pencolor("deep sky blue")t.penup()t.goto(68, 120)t.pendown()a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.25955 t.lt(3) t.fd(a) else: a = a - 0.25955 t.lt(3) t.fd(a)t.pencolor("pink")t.penup()t.goto(71, 120)t.pendown()a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.26 t.lt(3) t.fd(a) else: a = a - 0.26 t.lt(3) t.fd(a)t.pencolor("purple")t.penup()t.goto(72, 120)t.pendown()a = 1for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.269 t.lt(3) t.fd(a) else: a = a - 0.269 t.lt(3) t.fd(a)# 五環t.penup()t.goto(-55, -10)t.pendown()t.pencolor("blue")t.circle(10)t.penup()t.goto(-40, -10)t.pendown()t.pencolor("black")t.circle(10)t.penup()t.goto(-25, -10)t.pendown()t.pencolor("red")t.circle(10)t.penup()t.goto(-50, -20)t.pendown()t.pencolor("yellow")t.circle(10)t.penup()t.goto(-30, -20)t.pendown()t.pencolor("green")t.circle(10)t.done()
有些同學不會使用Python。我在這里打包了exe程序文件,雙擊執行即可。 下載地址:冰墩墩一鍵執行文件
本文由 貴州做網站公司 整理發布,部分圖文來源于互聯網,如有侵權,請聯系我們刪除,謝謝!
網絡推廣與網站優化公司(網絡優化與推廣專家)作為數字營銷領域的核心服務提供方,其價值在于通過技術手段與策略規劃幫助企業提升線上曝光度、用戶轉化率及品牌影響力。這...
在當今數字化時代,公司網站已成為企業展示形象、傳遞信息和開展業務的重要平臺。然而,對于許多公司來說,網站建設的價格是一個關鍵考量因素。本文將圍繞“公司網站建設價...
在當今的數字化時代,企業網站已成為企業展示形象、吸引客戶和開展業務的重要平臺。然而,對于許多中小企業來說,高昂的網站建設費用可能會成為其發展的瓶頸。幸運的是,隨...
師生年下文的意思?1.“明年”的意思是指年輕一方占主導地位。不是BL的專屬稱號。2.少爺的導師,課后的合同,老師,逆風而行,都是經典的師生戀。高校學生的敵人(一)托人(* _ *)嘻嘻.拓人的大學生系列,講的是學長學弟。3.水鏡的《玻璃心》是這本書的學長和學妹嗎?太久了,記不起來了。水鏡的文筆很好,細膩而脆弱的感情,淡淡的卻很感人?!赌居∩返摹睹咄谩访鑼懙氖菐熒鷳?,也是師生戀。4.說白了就是師生...
黃曉明為什么會和楊穎Angelababy在一起?Angelababy說她對黃曉明一見鐘情。黃先生比楊穎大10多歲,帥氣金黃。認識黃先生時,她還在娛樂圈努力工作。黃先生已經是一線明星了。人們認為angelababy和黃先生只是在玩,但他們已經相愛很久了。黃曉明和angelababy是圈中的“金童玉女”。當時娛樂圈有一半人出去參加婚禮?;槎Y現場就像一座宮殿,嘉賓陣容扼殺了任何頒獎典禮。也許每個女人都夢...
北京科技館在哪?北京市朝陽區北辰東路5號科技館是我國唯一的國家綜合性科技館,是實施科教興國和人才強國戰略,提高全民科學素質的大型科普基礎設施。一期于1988年9月22日竣工開業,二期于2000年4月29日竣工開業,新樓于2009年9月16日竣工開業[1]??萍拣^教育的主要形式是展示教育。通過科學性、知識性、趣味性相結合的展覽內容和互動形式,體現科學原理和技術應用,鼓勵公眾探索實踐,既普及科學知識,...