Python串列編程緊急求救!在線等待!非常感謝!
# List of Students 學生串列
student_names = ['Mike','Sarah','Matthew','Smith','Melanie','Renjith','Rahul','Mark','Rebeka','Jenna']
# List of Students Mark 四科成績
students_math_marks = [91.99,94.43,89,85.23,90.31,88,78.6,92,94.35,80.72]
students_english_marks = [83.56,95.34,83,90.44,88.32,95,97.7,91,95.54,89.32]
students_physics_marks = [92.19,89.51,90,88.55,89.45,97,89.8,87,81.72,93.54]
students_chemistry_marks = [89.64,87.63,98,94.66,93.78,85,86.9,95,84.81,91.86]
#總成績
students_total_marks = []
編程要求:
1.列印顯示學生姓名以“M”開頭的,英語成績在83和88之間的,并在同一行羅列其四科成績和總成績,以Tab隔開
Print all student’s Name, Math, English, Physics, Chemistry and Total Mark in a single line, columns separated by tab
# # Student's Name starts with “M” and English mark between 83 and 88.
2.列印顯示學生姓名以“h”結尾的,數學成績高于90或物理成績高于95的,并在同一行羅列其四科成績和總成績,以Tab隔開
Print all student’s Name, Math, English, Physics, Chemistry and Total Mark in a single line, columns separated by tab
# # Student's Name ends with “h” and Math mark higher than 90 or Physics mark > 95
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/144326.html
上一篇:set
下一篇:JavaScript解決
