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

想看看这一章节的任务的完整程式

谢谢

提问者:慕前端4358410 2022-07-08 14:38

个回答

  • 慕勒43996907
    2022-07-15 11:38:37

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

     sum=0

     for x in L:

        sum=sum+x

    print(sum/5)


  • weixin_慕莱坞3215187
    2022-07-08 17:41:09

    lice_scores = [100, 89, 92]

    bob_scores = [70, 65, 81]

    candy_scores = [88, 72, 77]

    all_scores = [alice_scores, bob_scores, candy_scores]

    print(all_scores) # ==> [[100, 89, 92], [70, 65, 81], [88, 72, 77]]

    alice_scores = [100, 89, 92]

    bob_scores = [70, 65, 81]

    candy_scores = [88, 72, 77]

    all_scores = [alice_scores, bob_scores, candy_scores]

    print(all_scores) # ==> [[100, 89, 92], [70, 65, 81], [88, 72, 77]]