摘要:
代码: def read_file(): result=[] with open("./student_grade_input.txt") as fin: for line in fin: line=line[:-1] result.append(line.split(",")) return re 阅读全文
posted @ 2021-10-24 19:46
scholar-for-ever
阅读(64)
评论(0)
推荐(0)
摘要:
代码: import random list=["xyla","tom","hrh","monkey","c","b","a","2","1"] i=int(input("Please enter an integer: ")) while i!=100: j=random.sample(list, 阅读全文
posted @ 2021-10-24 16:23
scholar-for-ever
阅读(368)
评论(0)
推荐(0)
摘要:
代码: def shengxiao(year): zodiac=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] i= (year-1900)%12 j=zodiac[i] return j myyear=int(input("Please ente 阅读全文
posted @ 2021-10-24 15:50
scholar-for-ever
阅读(224)
评论(0)
推荐(0)
摘要:
代码: def match_num(num): f=[6,2,5,5,4,5,6,3,7,6] if num==0: total=f[0] else: total=0 while num>0: x=num%10 total=total+f[x] num=num//10 return total sn 阅读全文
posted @ 2021-10-24 01:47
scholar-for-ever
阅读(159)
评论(0)
推荐(0)