我試圖讓Python打印一組特定的名稱,成績和字母等級,但是我會問及如何在「用戶「輸入號碼和姓名。我要做的就是確保它有一個名字,數字等級,並以列表字母等級表示,這樣 名稱級信 喬98 鮑勃·56女性 等等...打印學生成績,名單和字母等級
這裏是我已經...
A_score = 90
B_score = 80
C_score = 70
D_score = 60
F_score = 50
score1 = int(input('Enter score: '))
name1 = input('Enter name: ')
score = int(input('Enter score: '))
name = input('Enter name: ')
score = int(input('Enter score: '))
name = input('Enter name: ')
score = int(input('Enter score: '))
name = input('Enter name: ')
score = float(input('Enter score: '))
name = input('Enter name: ')
# Print the table headings
print('Name\tNumeric grade\tLetter grade')
print('---------------------------------')
#Print the names and grades
for score in range(A_score, B_score, C_score):
print(name1, '\t', score1)
您的具體問題是什麼?沒有人會爲你寫代碼。 **你得到什麼輸出**? – Meistro
我想弄清楚什麼是最好的方式來打印出名稱,等級和字母等級。它會是一個def函數或其他東西? –
這個問題令人困惑,因爲有一些經驗豐富的Python程序員會改變一些東西,但目前還不清楚哪些東西不適合你。請具體說明1)程序正在做什麼,2)它不是什麼。作爲第一步,我建議您查看列表和字典以存儲您的值。 –