以下為作業14內容內容
利用 iframe 嵌入投影片:
List程式:抽點名
cpa_number=[' 40123227',' 40123237',' 40123256',' 40423101',' 40423103',' 40423104',' 40423105',' 40423106',' 40423107',' 40423108',' 40423109',' 40423110',' 40423111',' 40423112',' 40423113',' 40423114',' 40423115',' 40423116',' 40423117',' 40423118',' 40423119',' 40423120',' 40423121',' 40423122',' 40423123',' 40423124',' 40423125',' 40423126',' 40423127',' 40423128',' 40423129',' 40423130',' 40423131',' 40423132',' 40423133',' 40423134',' 40423135',' 40423136',' 40423137',' 40423138',' 40423139',' 40423140',' 40423141',' 40423142',' 40423143',' 40423144',' 40423145',' 40423146',' 40423147',' 40423148',' 40423149',' 40423150',' 40423152',' 40423153',' 40423154',' 40423155']
cpa_name=[' 紀培俞', ' 陳琨揚',' 蘇建瑋',' 曾宜萱',' 劉怡萱',' 顏暄',' 王奕智',' 王翔佑',' 史育澤',' 江心平',' 何宗哲',' 余浩鋼',' 吳承翰',' 吳欣奕',' 吳冠毅',' 李希凡',' 李尚瑋',' 李冠辰',' 李國豪',' 阮伯宗',' 周嘉原',' 林尚漢',' 林秉憲',' 林國蓁',' 林嘉文',' 林濬翔',' 邱弘承',' 紀均瀚',' 范展榕',' 徐聖倫',' 張俊鴻',' 張勝雄',' 許承恩',' 郭力維',' 郭政修',' 陳正凱',' 陳冠錡',' 陳柏維',' 陳慶豪',' 傅仁禹',' 曾繼緯',' 黃子晏',' 黃羿誠',' 黃興煜',' 楊智勝',' 葉宗翰',' 廖先博',' 廖祈安',' 劉孟璋',' 劉佑程',' 蔡悌仁',' 鄭邦宏',' 賴浚珅',' 簡登瑋',' 闕崇晉',' 蘇麒彬']
g2_number=['40423105','40423106','40423107','40423114','40423115','40423116']
g2_name=['王奕智','王翔佑','史育澤','李希凡','李尚瑋','李冠辰']
#第2組組員有多少,有哪些人?
print('g2組員:', len(g2_number),'人')
print('成員:')
for i in range(len(g2_number)):
print( g2_number[i], g2_name[i])
print('-----分隔-----')
#班上幾個人? 抽點名點多少人? 抽到誰?
print('班上有',len(cpa_number),'人')
import random
total_number=len(cpa_number)
roll_number= int(input("抽點幾位?"))
for i in range(roll_number):
check = random.randint(0,total_number -1)
print(cpa_number[check],cpa_name[check])
Comments
comments powered by Disqus