奇点星程
开始Python编程
Python默认作品
作者:ng123
运行
清除
全屏运行
终端打印输出区
作品说明
抖音
点赞(0)
收藏 (0)
浏览量(11)
改编作品
我也要学编程
留 言
关于我们
奇点星程简介
用户协议
奇点星程官网
OJ平台
联系我们
微信:18065871965
邮箱:qidianxingcheng@163.com
建议反馈
软件下载
Scratch电脑版
Scratch安卓版
Python3.8
Dev-C++
管理平台
机构平台
校区平台
教师平台
©2017-2024. LLC. All RIGHTS RESERED.奇点星程
闽ICP备20003449号
闽公网安备35040302610058号
import turtle import math screen=turtle.Screen() screen.setup(800, 800) screen.title("抖音图标 - TikTok Logo") screen.bgcolor("white") t=turtle.Turtle() t.shape("turtle") t.speed(0) t.pensize(1) COLOR_BG="#000000" COLOR_CYAN="#00f2ea" COLOR_RED="#ff0050" COLOR_WHITE="#ffffff" def draw_rounded_rect(cx, cy, width, height, radius, color): """画一个圆角矩形背景""" t.pencolor(color) t.fillcolor(color) t.penup() start_x=cx - width / 2 + radius start_y=cy - height / 2 t.goto(start_x, start_y) t.pendown() t.begin_fill() t.setheading(0) t.forward(width-2*radius) t.circle(radius,90) t.forward(height-2*radius) t.circle(radius,90) t.forward(width-2*radius) t.circle(radius,90) t.forward(height-2*radius) t.circle(radius,90) t.end_fill() def draw_note(dx,dy,color): t.pencolor(color) t.fillcolor(color) t.penup() t.goto(dx-30,dy-90) t.pendown() t.begin_fill() t.circle(50) t.end_fill() t.penup() t.goto(dx-20,dy-60) t.pendown() t.begin_fill() t.goto(dx+20,dy-60) t.goto(dx+20,dy+80) t.goto(dx-20,dy+80) t.goto(dx-20,dy-60) t.end_fill() t.penup() t.goto(dx+20,dy+80) t.pendown() t.begin_fill() t.goto(dx+50,dy+95) t.goto(dx+80,dy+90) t.goto(dx+90,dy+70) t.goto(dx+90,dy+40) t.goto(dx+50,dy+40) t.goto(dx+50,dy+60) t.goto(dx+20,dy+60) t.goto(dx+20,dy+80) t.end_fill() draw_rounded_rect(0,0,480,480,80,COLOR_BG) draw_note(-10,-10,COLOR_CYAN) draw_note(10,10,COLOR_RED) draw_note(0,0,COLOR_WHITE) t.hideturtle() turtle.done()