logo

Crowdly

Podaj wartość zmiennej licz na końcu działania programu. listaNazwisk=[ "A...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Podaj wartość zmiennej licz na końcu działania programu.

listaNazwisk=["Aleksy","Abertanowicz","Jurecki","Zrzymała","Zamora","Wyrobski","Ksawerczyński","Merta","Baton","Żurek"]

licz=1

indeks= len(listaNazwisk)

for i in listaNazwisk:

for j in listaNazwisk:

tempIndeks = listaNazwisk.index(j)

if (tempIndeks<indeks-1) and (j.__gt__(listaNazwisk[tempIndeks+1])):

listaNazwisk[tempIndeks]=listaNazwisk[tempIndeks+1]

listaNazwisk[tempIndeks+1]=j

licz+=1

continue

continue

print(*listaNazwisk)

print(licz)

More questions like this

Want instant access to all verified answers on el.us.edu.pl?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!