iT邦幫忙

0

求救python大大

  • 分享至 

  • xImage

求救
https://ithelp.ithome.com.tw/upload/images/20220420/20148387O3Fl8sfAqE.png

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

1
熊熊工程師
iT邦研究生 2 級 ‧ 2022-04-20 09:18:47
最佳解答

僅供參考

names = ["陳巧巧", "吳大大", "李乖乖"]
courses = ["國文", "英文", "數學"]
chinese = [80, 75, 86]
english = [90, 88, 94]
math = [70, 67, 55]
score = []
averages = []

print("姓名\t國文\t英文\t數學\t總分\t平均")
for _name, _courses, _chinese, _english, _math in zip(names, courses, chinese, english, math):
    total_score = _chinese + _english + _math
    score.append(total_score)

    avg_score = round(total_score / len(names), 2)
    averages.append(avg_score)
    print(f"{_name}\t{_chinese}\t{_english}\t{_math}\t{total_score}\t{avg_score}")

print(f"國文最高分是:{names[chinese.index(max(chinese))]}")
print(f"英文最高分是:{names[english.index(max(english))]}")
print(f"數學最高分是:{names[math.index(max(math))]}")
print(f"第1名是:{names[averages.index(max(averages))]}")
看更多先前的回應...收起先前的回應...
石頭 iT邦研究生 4 級 ‧ 2022-04-20 10:04:31 檢舉

這..人也太好了吧..?

當早上的醒腦/images/emoticon/emoticon06.gif

尼克 iT邦大師 1 級 ‧ 2022-04-20 11:03:15 檢舉

跟海綿寶寶一樣好心。海綿寶寶

cue 我什麼事
我正忙著呢
/images/emoticon/emoticon82.gif

尼克 iT邦大師 1 級 ‧ 2022-04-20 13:47:49 檢舉

/images/emoticon/emoticon01.gif

chan15 iT邦新手 2 級 ‧ 2022-04-21 13:45:31 檢舉

幫人寫作業一點都不好

Peter iT邦新手 4 級 ‧ 2022-04-22 12:51:27 檢舉

如果連這麼基礎的都不願意動手試試,那滿分交了作業又能獲得什麼?看不太懂

我要發表回答

立即登入回答