1 #!/usr/bin/python3.4 2 # -*- coding: utf-8 -*- 3 4 import time 5 6 def matter1(music): 7 print("我想聽這些歌") 8 9 for i in range(0,len(music)):10 print("第" + str(i + 1) + "首歌是:" + str(music[i]))11 # 當前時間為12 print(time.strftime('%Y%H%M%S', time.localtime()))13 # 假設每一首歌曲的時間是2秒14 time.sleep(2)15 print("切換下一首歌...")16 17 def matter2(number):18 print("我在打碼")19 20 j = 021 while j <= number:22 print("我準備寫入第" + str(j + 1) +"行代碼")23 j = j + 124 # 當前時間為25 print(time.strftime('%Y%H%M%S', time.localtime()))26 # 假設每寫一行代碼的時間為1秒27 time.sleep(1)28 print("寫下一行代碼...")29 30 if __name__ == '__main__':31 32 start = time.time()33 34 &nbs