问答详情
源自:4-4 Python之for循环

怎么做

怎么做这个

提问者:weixin_慕运维9171314 2021-09-18 20:09

个回答

  • 常思方安
    2021-09-29 19:45:39

    L = [75, 92, 59, 68, 99]

    sum =0


    for s in L:

        sum=sum+s

    abv=sum/5

    print(abv);

    下载视频          

  • Hey_LJ
    2021-09-28 23:09:19

    L = [75, 92, 59, 68, 99]

    sum = 0

    num = 0

    for i in L:

        sum+=i

        num+=1

    print(round(sum/(float(num)),2))


  • weixin_慕盖茨3126952
    2021-09-19 16:12:14

    s1='ABC'

    s2='123'

    s3='xyz'

    for a in s1:

        for b in s2:

            for c in s3:

                print(a+b+c)