编写一个程序,根据用户输入显示课程信息。程序应显示收据,如下例所示。
输入:
u
输出:
Which degree do you choose? Undergraduate (U) or Postgraduate §: U
Course summary:
Location: Wollongong, Liverpool
Duration: 3 years full-time or part-time equivalent
输入:
P
C
Which degree do you choose? Undergraduate (U) or Postgraduate §: P
Which course do you choose? Master by Coursework ? or Master by Research ?: C
Course summary:
Location: Wollongong, Liverpool
Duration: 1.5-2 years full-time or part-time equivalent
输入:
P
R
输出:
Which degree do you choose? Undergraduate (U) or Postgraduate §: P
Which course do you choose? Master by Coursework ? or Master by Research ?: R
Course summary:
Location: Wollongong
Duration: 2 years full-time or part-time equivalent
d = input("Which degree do you choose? Undergraduate (U) or Postgraduate (P): ")
course = ""
if d == "P" :
course = input("Which course do you choose? Master by Coursework (C) or Master by Research (R): ")