請撰寫一程式,呼叫函式compute(),該函式功能為讓使用者輸入系別(Department)、學號(Student ID)和姓名(Name)並顯示這些訊息。
範例輸入:
Information Management
123456789
Tina Chen
範例輸出:Department: Information Management
Student ID: 123456789
Name: Tina Chen
程式碼:
def compute(x,y,z):
print('Department:',x)
print('Student ID:',y)
print('Name:',z)
dep, stu, name = input(), input(), input()
compute( dep, stu, name )
沒有留言:
張貼留言