Version française disponible plus bas
- Open file
FixExample1.py - Put you cursor on the error and enter
ctrl + ito open copilot
3. If it's proposed click on fix "Z" is not defined or enter /fix
4. Copilot should propose this correction
- Open file
FixExample2.pyand run the code - A
TypeErrorshould be displayed in the terminal - Copy the error message
- Select the code and ask copilot (using
ctrl+i) to fix the issue
- Open file
FixExample3.pyand run the code - A
IndexErrorshould be displayed in the terminal - Copy the error message
- Select the code and ask copilot (using
ctrl+i) to fix the issue
- Open file
FixExample4.pyand run the code - A
AttributeErrorshould be displayed in the terminal - Copy the error message
- Select the code and ask copilot (using
ctrl+i) to fix the issue
- Open file
FixExample5.pyand run the code 24is printed while the factorial of 5 is 120. We face alogical error- Select the code and ask copilot (using
ctrl+i) to fix the issue
- Ouvrez le fichier
FixExample1.py - Placez votre curseur sur l'erreur et appuyez sur
ctrl + ipour ouvrir Copilot
3. Si c'est proposé, cliquez sur fix "Z" is not defined ou entrez /fix
4. Copilot devrait proposer cette correction
- Ouvrez le fichier
FixExample2.pyet exécutez le code - Une
TypeErrordevrait s'afficher dans le terminal - Copiez le message d'erreur
- Sélectionnez le code et demandez à Copilot (en utilisant
ctrl+i) de corriger le problème
- Ouvrez le fichier
FixExample3.pyet exécutez le code - Une
IndexErrordevrait s'afficher dans le terminal - Copiez le message d'erreur
- Sélectionnez le code et demandez à Copilot (en utilisant
ctrl+i) de corriger le problème
- Ouvrez le fichier
FixExample4.pyet exécutez le code - Une
AttributeErrordevrait s'afficher dans le terminal - Copiez le message d'erreur
- Sélectionnez le code et demandez à Copilot (en utilisant
ctrl+i) de corriger le problème
- Ouvrez le fichier
FixExample5.pyet exécutez le code 24est imprimé alors que la factorielle de 5 est 120. Nous faisons face à uneerreur logique- Sélectionnez le code et demandez à Copilot (en utilisant
ctrl+i) de corriger le problème




