Commit 1328ee1a by BellCodeEditor

auto save

parent d6878c1d
import turtle
pen = turtle.Pen()
pen.shape("turtle")
turtle.done()
\ No newline at end of file
##############自学python#############
"""
# 首字母大写 title()
# 字符串全部大写 upper()
# 字符串全部小写 lower()
name = "Adc Loveface"
print(name.title())
print(name.upper())
print(name.lower())
# 合并(拼接)字符串 +
CHN_name = "zheng cheng zhi"
ENG_name = "kimi"
full_name = CHN_name + " " + ENG_name
print("Hello," + full_name.title() + "!")
# 在字符串中添加制表符 \t
# 在字符串中添加换行符 \n
print("\tpython")
print("python")
print("Languages:\nPytho\nC\nJaveScript")
print("Languages:\n\tPython\n\tC\n\tJaveScript")
"""
bicy = ['rrt2','yyyy','rrr4','ioio5','iuh0']
print(bicy[-5])
# 确定宴会邀请名单
party = ['xiao ming','xiao long','xiao li']
print(party)
# 删除无法赴宴人员名单,并说明原因
party1 = 'xiao li'
party.remove(party1)
print(party1.title() + "有事来不了了。")
# 添加新邀请人员名单,并打印
party.append('xiao hong')
print(party)
# 向确定名单的每个人发出邀请
print(party[0].title() + "您好,邀请您来参加本末的晚宴!")
print(party[1].title() + "您好,邀请您来参加本末的晚宴!")
print(party[2].title() + "您好,邀请您来参加本末的晚宴!")
print("我找到了一个更大的包间")
# 新增三位宴会嘉宾名单
party.insert(0,'xiao qing')
party.insert(2,'xiao xue')
party.append('xiao peng')
print(party)
# 向新的宴会名单发出通知
print(party[0].title() + "lai chi fan la")
print(party[1].title() + "lai chi fan la")
print(party[2].title() + "lai chi fan la")
print(party[3].title() + "lai chi fan la")
print(party[4].title() + "lai chi fan la")
print(party[5].title() + "lai chi fan la")
# 包间又没有了,宴请不了这么多人,只能请两人
poped_party1 = party.pop()
print(poped_party1.title() + "实在不好意思,这个周末不能请你参加宴会了")
print(party)
\ No newline at end of file
print("Hello world!")
\ No newline at end of file
import turtle
pen = turtle.Pen()
pen.shape("turtle")
pen.color("red")
pen.speed(500)
pen.fillcolor("pink")
pen.begin_fill()
for i in range(5):
pen.forward(200)
pen.right(144)
pen.end_fill()
pen.hideturtle()
turtle.done()
import turtle
pen=turtle.Pen()
pen.setpos(-200,0)
#画笔速度
pen.speed(50)
#画笔颜色
pen.color("red")
#填充颜色
pen.fillcolor("yellow")
#开始填充颜色
pen.begin_fill()
for i in range(72):
pen.forward(400)
pen.right(175)
pen.end_fill()
turtle.done()
import turtle
p = turtle.Pen()
p.setpos(-200,0)
p.speed(50)
p.color("red")
p.fillcolor("yellow")
p.begin_fill()
for i in range(72):
p.forward(400)
p.right(175)
p.end_fill()
p.hideturtle()
turtle.done()
\ No newline at end of file
name = "悟空 "
name = "悟空 "
word = "非常感谢"
print(name+word)
\ No newline at end of file
num = 9
num = 9
float_num = 3.1415926
name = "悟空"
goods = ["雪碧","可口可乐","咖啡"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment