以下為作業十三內容
利用 iframe 嵌入投影片:
Jupyter notebook 檔案內容:
-
學號-姓名
-
學號-姓名 空一行
-
第幾個字為廖
-
有幾個姓廖
-
點名
In [1]:g9_number = ["40423243","40423244","40423245","40423252","40423253","40423254"] g9_name = ["楊錦鑫","詹晏傑","廖洪欽","謝孟哲","簡嘉宏","蘇柏丞"] for i in range (len(g9_number)): print(g9_number[i],g9_name[i],sep = "-")
In [3]:g9_number = ["40423243","40423244","40423245","40423252","40423253","40423254"] g9_name = ["楊錦鑫","詹晏傑","廖洪欽","謝孟哲","簡嘉宏","蘇柏丞"] for i in range (len(g9_number)): print(g9_number[i],g9_name[i],sep = "-",end = "\n\n")
In [7]:name = '廖洪欽' for i in range (len(name)): if name[i] == "廖": print("第",i+1,"個字元為廖")
In [5]:cpb_number = ['40023215', '40123157', '40123210', '40123254', '40223252', '40423201', '40423202', '40423203', '40423204', '40423205', '40423206', '40423207', '40423208', '40423209', '40423210', '40423211', '40423212', '40423213', '40423214', '40423215', '40423216', '40423217', '40423218', '40423219', '40423220', '40423221', '40423222', '40423223', '40423224', '40423225', '40423226', '40423227', '40423228', '40423229', '40423230', '40423231', '40423232', '40423233', '40423234', '40423235', '40423236', '40423237', '40423238', '40423239', '40423240', '40423241', '40423242', '40423243', '40423244', '40423245', '40423246', '40423247', '40423248', '40423249', '40423250', '40423251', '40423252', '40423253', '40423254'] cpb_name = ['吳承融', '盧毅民', '蔡依靜', '鍾文榮', '羅竟豪', '黃上芸', '楊俐瑾', '鄭惟芯', '王子陽', '王彥斌', '王驍捷', '朱修林', '江碩宸', '余柏諺', '吳丹邁', '吳東霖', '吳秉駿', '李世欽', '李奇軒', '李泓毅', '李彥錞', '阮奕誠', '周政叡', '林宏一', '林易寬', '林建辰', '林稟儀', '林德威', '林瀟俊', '洪嘉緯', '胡原愷', '徐英軒', '張育誠', '張祐瑜', '張竣皓', '連緒', '郭金豪', '郭雲軒', '陳俊瑋', '陳威憲', '陳韋凡', '陳憲棠', '彭子旻', '游智文', '黃柏杰', '黃鈺灃', '楊哲維', '楊錦鑫', '詹晏傑', '廖洪欽', '劉永駿', '劉俊成', '蔡昆傑', '蔡憲佳', '鄭裕倫', '賴信穎', '謝孟哲', '簡嘉宏', '蘇柏丞'] # 碼表歸零 count = 0 # 設法逐一列出成員姓名 for i in range (len(cpb_name)): # 已經取得各成員姓名為 cpb_name # 因為只對姓進行檢查, 而姓為 cpb_name[i][0] # 利用 if 判斷姓是否為 "廖" if cpb_name[i][0] == "廖": count += 1 print(count)
In [6]:cpb_number = ['40023215', '40123157', '40123210', '40123254', '40223252', '40423201', '40423202', '40423203', '40423204', '40423205', '40423206', '40423207', '40423208', '40423209', '40423210', '40423211', '40423212', '40423213', '40423214', '40423215', '40423216', '40423217', '40423218', '40423219', '40423220', '40423221', '40423222', '40423223', '40423224', '40423225', '40423226', '40423227', '40423228', '40423229', '40423230', '40423231', '40423232', '40423233', '40423234', '40423235', '40423236', '40423237', '40423238', '40423239', '40423240', '40423241', '40423242', '40423243', '40423244', '40423245', '40423246', '40423247', '40423248', '40423249', '40423250', '40423251', '40423252', '40423253', '40423254'] cpb_name = ['吳承融', '盧毅民', '蔡依靜', '鍾文榮', '羅竟豪', '黃上芸', '楊俐瑾', '鄭惟芯', '王子陽', '王彥斌', '王驍捷', '朱修林', '江碩宸', '余柏諺', '吳丹邁', '吳東霖', '吳秉駿', '李世欽', '李奇軒', '李泓毅', '李彥錞', '阮奕誠', '周政叡', '林宏一', '林易寬', '林建辰', '林稟儀', '林德威', '林瀟俊', '洪嘉緯', '胡原愷', '徐英軒', '張育誠', '張祐瑜', '張竣皓', '連緒', '郭金豪', '郭雲軒', '陳俊瑋', '陳威憲', '陳韋凡', '陳憲棠', '彭子旻', '游智文', '黃柏杰', '黃鈺灃', '楊哲維', '楊錦鑫', '詹晏傑', '廖洪欽', '劉永駿', '劉俊成', '蔡昆傑', '蔡憲佳', '鄭裕倫', '賴信穎', '謝孟哲', '簡嘉宏', '蘇柏丞'] import random roll_call_num = int(input("how many roll calls?")) for i in range(roll_call_num): roll = random.randint(0, len(cpb_number)-1) print(cpb_number[roll],cpb_name[roll])
Vimeo 影片嵌入(直接從 Vimeo 影片上的 Share 複製 html 碼):
40423245 hw13 from 40423245-1 on Vimeo.