Commit 7ae2ea0f by BellCodeEditor

auto save

parent 7c7e5e9c
Showing with 0 additions and 34 deletions
print("Hello world!") #字符串
print(100) #整数
print("100") #字符串
print(100+100)#+起运算作用
print("小明"+"去上课")#+起连接作用
print("100+100") #字符串
print("100"+"100") #+起连接作用
\ No newline at end of file
import turtle #导入画图工具
turtle.pencolor("red")#设置画笔颜色
turtle.fillcolor("yellow")#设置填充颜色
turtle.begin_fill() #开始填充
for i in range(36): #画太阳花
turtle.forward(200)#边长200
turtle.right(170) #旋转170度
turtle.end_fill() #结束填充
turtle.done() #保留画布
a=100 #整数int
b="100"#字符串str
c="100.5"#浮点型 float
d=[100,101,102,103]#列表list
print(type(a))#输出变量a的数据类型
print(type(b))#输出变量b的数据类型
print(type(c))#输出变量c的数据类型
print(type(d))#输出变量d的数据类型
\ No newline at end of file
import random
a=random.randint(1,10)
print(a)
\ No newline at end of file
neme=input("输入名字")
print(neme+"你好啊")
\ 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