Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Variable Name Fixer | Variable and Assignment Mistakes
Common Python Mistakes and How to Fix Them

bookChallenge: Variable Name Fixer

Tâche

Swipe to start coding

Complete the function fix_variable_names to correct variable naming and assignment issues in the code.

  • Rename any variables that use invalid names (such as those starting with a digit or containing spaces).
  • Change any variables that use reserved Python keywords as names.
  • Fix any accidental overwrites of variables that should remain distinct.
  • Ensure all variable names follow Python naming conventions.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

close

Awesome!

Completion rate improved to 5.26

bookChallenge: Variable Name Fixer

Glissez pour afficher le menu

Tâche

Swipe to start coding

Complete the function fix_variable_names to correct variable naming and assignment issues in the code.

  • Rename any variables that use invalid names (such as those starting with a digit or containing spaces).
  • Change any variables that use reserved Python keywords as names.
  • Fix any accidental overwrites of variables that should remain distinct.
  • Ensure all variable names follow Python naming conventions.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 2. Chapitre 3
single

single

some-alt