logo

Crowdly

En Python es pot afegir una clàusula else en una estructura repetitiva, com es...

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

En Python es pot afegir una clàusula else en una estructura repetitiva, com es veu a continuació:

Bucle while:

# inicialització variables

while condició:

    # cos del bucle

else:

    #instruccions

Bucle for:

for variable in llista:

    # cos del bucle

else:

    #instruccions

Convé tenir-ne molt clar el funcionament perquè és molt útil en programació estructurada.

0%
100%
More questions like this

Want instant access to all verified answers on ioc.xtec.cat?

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

Browser

Add to Chrome