TQC+ 程式語言Python 501 訊息顯示
題目說明:
請撰寫一程式,呼叫函式compute(),該函式功能為讓使用者輸入系別(Department)、學號(Student ID)和姓名(Name)並顯示這些訊息。
範例輸入
Information Management
123456789
Tina Chen
範例輸出
Department: Information Management
Student ID: 123456789
Name: Tina Chen
程式碼:
def compute():
Department = input()
StudentID = input()
Name = input()
print('Department: %s' %Department)
print('Student ID: %s' %StudentID)
print('Name: %s' %Name)
compute()
一個評論
自動引用通知: