Python赛前辅导第二课 一、输出输入 print() print(“Hello,World!”) print(“2+3”) print(2+3) print(“2+3=”,2+3,sep=’’,end=’’) input() a,b,c=map(int,input().split())

二、数据类型 int float str “” ‘’ list [ ] bool True False

三、运算符 算数运算符:** * / // % + -

关系运算符:< > <= >= == != in

逻辑运算符:not and or

四、字符串、列表的索引和切片

[apple]

[‘a’,1,3.0]

n=’apple’

print(n[0:3:1])

五、顺序结构

0 条评论

目前还没有评论...