擅长:python、mysql、java
<p>好的,我想我已经修好了我的代码,它实际上有点工作,看一看!我试着在输入字符串时使用.append,效果很好!!`</p>
<pre><code>ekt=[]
pl=[]
nm=[]
for i in range(5):
nms=raw_input("Ποιο το όνομα της χώρας?")
ekts=input("Ποια η εκταση της χώρας αυτής?")
pls=input("Ποιός είναι ο πληθυσμός της χώρας αυτής?")
ekt.append(ekts)
pl.append(pls)
nm.append(nms)
max_ekts=-2
min_pls=-2
sum_pls=0
for i in range(5):
if ekt[i]>max_ekts:
max_ekts=ekt[i]
max_ekts_nm=nm[i]
if pl[i]>min_pls:
min_pls=pl[i]
min_pls_nm=nm[i]
sum_pls=sum_pls+pl[i]
mo_pls=sum_pls/5.0
print"Χώρα με την μεγαλύτερη έκταση:",max_ekts_nm
print"χώρα με το μικρότερο πληθυσμό:",min_pls_nm
print"O μέσος όρο του πληθυσμού των 15 χωρών της Ευρωπαϊκής Ένωσης:",mo_pls
</code></pre>
我以后会考虑使用+= </p>