package variable
//定义范围Range 继承于List
def range=1..10
println(range[3])//4
println(range.contains(3))//true
println(range.from)//1
println(range.to)//10
Range range1 //定义
//遍历
range.each {//闭包
println( it)
}
for(i in range){
println(i)
}
def reslt=getGrade(75)
def getGrade(Number number){
def resultswitch (number){ case 0..60: result='不及格' break case 60..<70: result='及格' break case 70..<80: result='良好' break case 80..100: result='优秀' break} result //return 可以不写
}
println(reslt)//良好