```
```python
import turtle
turtle.left(45)
turtle.fd(150)
turtle.right(135)
turtle.fd(300)
turtle.left(135)
turtle.fd(150)
```## rgb色彩模式
#### 由三種顏色構成的萬物色
- ##### rgb指紅藍綠三個通道的顏色組合
- ##### 覆蓋視力所能感知的所有顏色
- ##### rgb每色取值範圍0-255整數或0-1小數
trutle庫的成品(玫瑰花):
import turtle
turtle.setup(1500,800)
turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(10, 180)
turtle.circle(25, 110)
turtle.left(50)
turtle.circle(60, 45)
turtle.circle(20, 170)
turtle.right(24)
turtle.fd(30)
turtle.left(10)
turtle.circle(30, 110)
turtle.fd(20)
turtle.left(40)
turtle.circle(90, 70)
turtle.circle(30, 150)
turtle.right(30)
turtle.fd(15)
turtle.circle(80, 90)
turtle.left(15)
turtle.fd(45)
turtle.right(165)
turtle.fd(20)
turtle.left(155)
turtle.circle(150, 80)
turtle.left(50)
turtle.circle(150, 90)
turtle.end_fill()
turtle.left(150)
turtle.circle(-90, 70)
turtle.left(20)
turtle.circle(75, 105)
turtle.setheading(60)
turtle.circle(80, 98)
turtle.circle(-90, 40)
turtle.left(180)
turtle.circle(90, 40)
turtle.circle(-80, 98)
turtle.setheading(-83)
turtle.fd(30)
turtle.left(90)
turtle.fd(25)
turtle.left(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(-80, 90)
turtle.right(90)
turtle.circle(-80, 90)
turtle.end_fill()
turtle.right(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(85)
turtle.left(90)
turtle.fd(80)
turtle.right(90)
turtle.right(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(80, 90)
turtle.left(90)
turtle.circle(80, 90)
turtle.end_fill()
turtle.left(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(60)
turtle.right(90)
turtle.circle(200, 60)
turtle.done()
Go Zap日誌庫的基礎使用
在使用go語言開發專案的過程中,必不可少的需要記錄程式在執行過程中的日誌,這不僅僅能幫助我們快速定位bug,也可以幫助我們實現程式調優,下面就簡單介紹一下我自己用過的日誌記錄第三方庫go.uber.org zap go get u go.uber.org zappackage main import...
使用SQL語句基礎 建立庫
create database school 主資料檔案引數 on primary name schoolmain 主資料邏輯名稱 size 10mb,初始大小 filegrowth 10 檔案增長比例 filename f schoolph.mdf 物理檔名,和你存放的位置 maxsize 100...
Redis 基礎和node redis庫使用
set str test string 1 ok get str test string 1 hmset myhash name redis hash age 20 設定雜湊 myhash name redis hash age 20 ok hmget myhash name age 獲取雜湊 my...