Skip to content

Latest commit

 

History

History
93 lines (64 loc) · 2.94 KB

File metadata and controls

93 lines (64 loc) · 2.94 KB

Version française disponible plus bas

Challenge instructions for /fix command

Step 1 : Name error

  1. Open file FixExample1.py
  2. Put you cursor on the error and enter ctrl + i to open copilot

alt text 3. If it's proposed click on fix "Z" is not defined or enter /fix 4. Copilot should propose this correction

alt text

Step 2 : Type Error

  1. Open file FixExample2.py and run the code
  2. A TypeError should be displayed in the terminal
  3. Copy the error message
  4. Select the code and ask copilot (using ctrl+i) to fix the issue

alt text

Step 3 : Index Error

  1. Open file FixExample3.py and run the code
  2. A IndexError should be displayed in the terminal
  3. Copy the error message
  4. Select the code and ask copilot (using ctrl+i) to fix the issue

alt text

Step 4 : Attribute Error

  1. Open file FixExample4.py and run the code
  2. A AttributeError should be displayed in the terminal
  3. Copy the error message
  4. Select the code and ask copilot (using ctrl+i) to fix the issue

alt text

Step 5 : Logical error

  1. Open file FixExample5.py and run the code
  2. 24 is printed while the factorial of 5 is 120. We face a logical error
  3. Select the code and ask copilot (using ctrl+i) to fix the issue

alt text

Version française

Instructions de défi pour la commande /fix

Étape 1 : Erreur de nom

  1. Ouvrez le fichier FixExample1.py
  2. Placez votre curseur sur l'erreur et appuyez sur ctrl + i pour ouvrir Copilot

alt text 3. Si c'est proposé, cliquez sur fix "Z" is not defined ou entrez /fix 4. Copilot devrait proposer cette correction

alt text

Étape 2 : Erreur de type

  1. Ouvrez le fichier FixExample2.py et exécutez le code
  2. Une TypeError devrait s'afficher dans le terminal
  3. Copiez le message d'erreur
  4. Sélectionnez le code et demandez à Copilot (en utilisant ctrl+i) de corriger le problème

alt text

Étape 3 : Erreur d'index

  1. Ouvrez le fichier FixExample3.py et exécutez le code
  2. Une IndexError devrait s'afficher dans le terminal
  3. Copiez le message d'erreur
  4. Sélectionnez le code et demandez à Copilot (en utilisant ctrl+i) de corriger le problème

alt text

Étape 4 : Erreur d'attribut

  1. Ouvrez le fichier FixExample4.py et exécutez le code
  2. Une AttributeError devrait s'afficher dans le terminal
  3. Copiez le message d'erreur
  4. Sélectionnez le code et demandez à Copilot (en utilisant ctrl+i) de corriger le problème

alt text

Étape 5 : Erreur logique

  1. Ouvrez le fichier FixExample5.py et exécutez le code
  2. 24 est imprimé alors que la factorielle de 5 est 120. Nous faisons face à une erreur logique
  3. Sélectionnez le code et demandez à Copilot (en utilisant ctrl+i) de corriger le problème

alt text