Commit 32e04f20 by BellCodeEditor

auto save

parent 33a56590
# print("Hello world!") print("Hello world!")
# age = "12" \ No newline at end of file
# print("小明今年"+age+"岁了")
"""
x = 50
y = 14
print("x//y =",x//y)
x = [1,2,3,4]
x.append(4)
print(x)
str1 = "Nice Again!"
print("str1 =",str1[2:-3])
list1 = ['Tom','Jack','Chris','Evan']
list1.pop(1)
print(list1)
print('hahaha',"hahaha",'''hahaha''')
unkonwn = ()
print(type(unkonwn))
list1 = ['a','b','c','d','e']
# list1.pop(1) # ok
# list1.pop('b')# no
# del list1[2] # no
# list1.remove('b') # ok
# list1.pop(2) # no
# del list1[1] # ok
print(list1)
dict1 = {'Name':'Tom','Age':35}
print(dict1['Age'])
str1 = "Excuse me"
print(str1[3:6]) # no
print(str1[2:6]) # ok
print(str1[-8:-3]) # no
print(str1[-7:-3]) # ok
print(str1[2:-3]) # ok
# 填空题1 答案:[1,2]
list1 = [1,2,3,4,5]
list2 = []
for i in list1:
if i == 3:
break
list2.append(i)
print(list2)
# 填空题2 答案:[0,7,14,21,28]
list1 = []
for i in range(0,30,7):
list1.append(i)
print(list1)
# 填空题3 答案:4950
x = 1
sum = 0
while x < 100:
sum += x
x += 1
print(sum)
# 填空题4 答案:7.6
x = 5
y = 12
print(x-y/x+x)
# 填空题5 答案:89
x = 5
y = 6
print(x**3-y**2)
# 填空题6 答案:dgv
str1 = 'sdfg'
str2 = 'cvbn'
print(str1[1::2] + str2[1:2])
# 填空题7 答案:[3,4,5]
# def test_func(list):
# print(list[-5:-2])
#
# list1 = [1,2,3,4,5,6,7]
# test_func(list1)
# 填空题8 答案:[2,3,5]
x = [3,2,5]
if x[0] > x[1]:
x[0], x[1] = x[1],x[0]
if x[1] > x[2]:
x[1], x[2] = x[2],x[1]
print(x)
x = (1,2,3,4,2)
del x(2)
print(x)
"""
import turtle
pen = turtle.Pen()
pen.setpos(-200,0)
pen.shape("turtle")
pen.color("red")
pen.speed(1000)
pen.fillcolor("yellow")
pen.begin_fill()
for i in range(72):
pen.forward(400)
pen.right(175)
for i in range(360):
pen.forward(1.7444)
pen.right(1)
pen.end_fill()
pen.hideturtle()
turtle.done()
\ No newline at end of file
...@@ -6,9 +6,9 @@ pen.color("red") ...@@ -6,9 +6,9 @@ pen.color("red")
pen.speed(500) pen.speed(500)
pen.fillcolor("pink") pen.fillcolor("pink")
pen.begin_fill() pen.begin_fill()
for i in range(72): for i in range(5):
pen.forward(200) pen.forward(200)
pen.right(175) pen.right(144)
pen.end_fill() pen.end_fill()
pen.hideturtle() pen.hideturtle()
......
name = "悟空 "
name = "悟空 "
word = "非常感谢!"
print(name+word)
\ No newline at end of file
num = 9
num = 9
float_num = 3.1415926
name = "悟空"
goods = ["雪碧","可口可乐","咖啡"]
print(type(num))
print(type(float_num))
print(type(name))
print(type(goods))
\ No newline at end of file
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