導航:首頁 > 編程語言 > 怎麼用編程查成績

怎麼用編程查成績

發布時間:2023-09-08 00:45:07

『壹』 如何用python編程做一個迷你成績查詢器

python的cmd模塊為命令行應用提供了強大的支持:

#!/usr/bin/envpython
#coding:utf-8


fromcmdimportCmd


classDegree(Cmd):

STUDENTS={}

defdo_enter(self,cmdln):
"""Enterastudent';"""
ln=cmdlnorraw_input("EnterStudent'snameanddegree:")
student,degree=ln.split("")
self.STUDENTS[student]=int(degree)

defdo_delete(self,cmdln):
"""Enterastudent'snamefordelete;"""
student=cmdlnorraw_input("EnterStudent'snamefordelete:")
ifstudentinself.STUDENTS:
delself.STUDENTS[student]

defdo_list(self,cmdln):
"""ListStudentsName-Degree;"""
forstudent,degreeinsorted(self.STUDENTS.items()):
printstudent,degree

defdo_compute(self,cmdln):
"""Computedegrees'averangedata;"""
avg=sum(self.STUDENTS.values())/len(self.STUDENTS)
print"Avg:{avg}".format(avg=avg)

defdo_quit(self,cmdln):
"""Leavethsapplication."""
return1


if__name__=="__main__":
degreemgr=Degree()
degreemgr.cmdloop()

"""
help
tim@crunchbangtime:~/workspace/$pythonqa_cmd.py
(Cmd)?

Documentedcommands(typehelp<topic>):
========================================


(Cmd)?enter
Enterastudent';
(Cmd)helplist
ListStudentsName-Degree;
(Cmd)
(Cmd)enterTim93
(Cmd)enterBruce38
(Cmd)enter
EnterStudent'snameanddegree:Bruce88
(Cmd)enterHans89
(Cmd)enterBill94
(Cmd)
(Cmd)list
Bill94
Bruce88
Hans89
Tim93
(Cmd)deleteBill
(Cmd)list
Bruce88
Hans89
Tim93
(Cmd)compute
Avg:90
(Cmd)quit
tim@crunchbangtime:~/workspace/$
"""

『貳』 如何製作一個簡單的查詢成績的網頁

你的需求用易查分就可以搞定,操作步驟也很簡單,你只需要把查詢內容做成excel電子表格,上傳到易查分,然後根據任務向導,完成各個向導的內容,就可以生成你想要的查詢網頁;具體操作步驟如下:

第1步:您需要注冊易查分賬號,登錄後點擊首頁的「新建坦猜絕查詢」進入查詢任務創建向導;



希望以上內容能夠幫到你,如在操作過程中有不懂的地方,歡迎向我提問哈!

閱讀全文

與怎麼用編程查成績相關的資料

熱點內容
程序員公園采訪 瀏覽:801
程序員實戰教程要多長時間 瀏覽:964
企業數據加密技巧 瀏覽:125
租雲伺服器開發 瀏覽:804
程序員告白媽媽不同意 瀏覽:327
攻城掠地怎麼查看伺服器 瀏覽:592
android開機黑屏 瀏覽:568
mc純生存伺服器是什麼意思 瀏覽:440
樹莓派火焰蜂鳴器python 瀏覽:898
我的世界伺服器強制疾跑怎麼開 瀏覽:277
用什麼app看施工圖紙 瀏覽:493
張三學python函數 瀏覽:379
女子程序員照片 瀏覽:307
武漢c程序員招聘 瀏覽:684
csk跟蹤演算法 瀏覽:26
數據挖掘中用到的演算法 瀏覽:845
更改ubuntu伺服器地址 瀏覽:504
學做燒菜用什麼app 瀏覽:704
程序框圖怎麼加密 瀏覽:374
文件自解壓失敗怎麼辦 瀏覽:901