❶ 网络投票系统或代码
网上有得下载。
到【源码站长】。
❷ 如何用python来做一个投票app
django的教程就是一个投票的例子,如果是要做网页版的,可以参考下,很不错,https://docs.djangoproject.com/en/1.6/intro/tutorial01/
可以看下链接
❸ 帮忙完善在线投票系统源程序
不懂!
❹ 用python写了个投票程序,但出现错误,麻烦看看错在哪
试了半天才弄明白是怎么回事。是中英文的问题。你在votes.txt里的冒号放的是中文冒号:,而你在程序里split用的是英文的冒号:, 结果split后得到的内容是一个,而不是两个。
这样你将一个内容赋值给两个就会出现
ValueError: need more than 1 value to unpack
你可以打印print my_love
这样就知道为什么了。
❺ python新手求助 写一个投票的代码 def vote() 有三种,yes,no,abstain
defvote(stra):
yesstr=['yes','y']
nostr=['no','n']
abstainedstr=['abstained','a']
count=0
yescount=0
stra=stra.replace(',','')
foriinstra.split():
lowerstr=i.lower()
iflowerstrinyesstr:
yescount+=1
count+=1
eliflowerstrinnostr:
count+=1
ifyescount==count:
return'proposalpassesunanimously'
ifyescount*1.0/count>=2.0/3.0:
return''
ifyescount*1.0/count>=0.5:
return''
return'proposalfails'
if__name__=='__main__':
stra=raw_input('Entertheyes,no,:
')
printvote(stra)
❻ 用python和django做一个投票网站
我留个记录,看谁会这么好心有现成的项目,我也想参考参考
❼ python如何编一个投票系统
LI=['张三','李四','刘五']
definputs(prompt,selectlist,eof='EOF'):
whileTrue:
choice=raw_input(prompt)
ifchoice==eof:
break
elifchoiceinselectlist:
yieldchoice
else:
print"onlyin%s"%selectlist
collects=map(None,inputs("投票",LI,eof='投票结束'))
#bydict
counter={}
fornameincollects:
counter[name]=counter.get(name,0)+1
forname,cinsorted(counter.items(),key=lambdax:x[1],reverse=True):
printname,c
#bycollections.Counter
importcollections
counter=collections.Counter(collects)
forname,cincounter.most_common(10):
printname,c
❽ Python做一个投票APP
看django官方教程,有一个投票app的例子。
❾ 跪求一段网上投票系统的代码
现在是淡季,没有活了,等快过年了吧,现在建群也拉不到兄弟了,并且有群必须有好的人季关系才行,要不接不到活,兄弟们也都跑了。呵。。。我是做投票软件的。也就是你说的投票上家,明白了吗。想找我们就到搜索引擎里搜 投票软件
❿ 一个简单的投票系统
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/connVote.asp" -->
<%
if(Request("rResult") <> "") then '=================注意 换行
Command1__strUpdate = Request("rResult")
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_connVote_STRING
Command1.CommandText = "UPDATE tVote SET " + Replace(Command1__strUpdate, "'", "''") + "=" + Replace(Command1__strUpdate, "'", "''") + "+1"
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
Response.Write ("<script>alert('投票完毕!')</script>")
ELSE
Response.Write ("<script>alert('rResult为空!')</script>")
END IF '===========注意 结束判断
Response.Redirect("result.asp")
%>