#12607: ??????????


r2005.wang@gmail.com (王藝誠)

School : No School
ID : 67850
IP address : [36.238.215.45]
Last Login :
2022-01-23 22:54:00
a624. 4. Password Analyzer -- HP CodeWars2007 | From: [122.121.180.76] | Post Date : 2017-08-23 14:58

for aaa in range(4):
i=input()
so=0
if len(i)>7:
so+=1
if i!=i.lower():
so+=1
i=i.lower()
g=True
for k in i:
if 97>ord(k)or ord(k)>122:
g=False
so+=int(not g)
print("This password is",(["WEAK","ACCEPTABLE","GOOD","STRONG"])[so])

 
#14216: Re:??????????


a22671512 (夢之旋律)

School : 國立新營高級中學
ID : 53576
IP address : [220.135.123.130]
Last Login :
2024-02-14 21:30:50
a624. 4. Password Analyzer -- HP CodeWars2007 | From: [49.213.156.148] | Post Date : 2018-06-30 04:42

for aaa in range(4):
i=input()
so=0
if len(i)>7:
so+=1
if i!=i.lower():
so+=1
i=i.lower()
g=True
for k in i:
if 97>ord(k)or ord(k)>122:
g=False
so+=int(not g)
print("This password is",(["WEAK","ACCEPTABLE","GOOD","STRONG"])[so])


for aaa in range(4):

題目範例是4

但是實際資料不可能只有4

要改成能自動判斷是否還有輸入的程式才行

可以去看ZeroJudge首頁的使用手冊

那裏有教怎麼吃進輸入

 
ZeroJudge Forum