Python au lycée (1) : Les variables Entraînement

QCM : Opérateurs arithmétiques en Python

Durée estimée
5 minutes
Difficulté
Votre progression

Créez un compte gratuit pour suivre votre avancement et reprendre où vous avez laissé.

Créer un compte

Objectif travaillé

Ce QCM porte sur les opérateurs arithmétiques de Python : quotient entier //, reste %, puissance **, division / et priorités de calcul. Choisissez la bonne réponse parmi les quatre propositions.

Déroulement pas à pas (Correction et Indices)

Question 1 :

Que vaut 17 // 5 en Python ?

  • (Incorrect) $3{,}4$
  • (Correct) $3$
  • (Incorrect) $2$
  • (Incorrect) $85$
Question 2 :

Que vaut 17 % 5 en Python ?

  • (Incorrect) $3$
  • (Incorrect) $5$
  • (Correct) $2$
  • (Incorrect) $3{,}4$
Question 3 :

Que vaut 2 ** 6 en Python ?

  • (Incorrect) $12$
  • (Incorrect) $36$
  • (Correct) $64$
  • (Incorrect) $8$
Question 4 :

Que renvoie l'instruction type(8 / 2) en Python ?

  • (Correct) class 'float'
  • (Incorrect) class 'int'
  • (Incorrect) class 'str'
  • (Incorrect) $4$
Question 5 :

Que vaut 10 + 2 * 3 en Python ?

  • (Incorrect) $36$
  • (Correct) $16$
  • (Incorrect) $32$
  • (Incorrect) $18$
Question 6 :

Que vaut (10 + 2) * 3 - 4 ** 2 en Python ?

  • (Incorrect) $32$
  • (Incorrect) $144$
  • (Correct) $20$
  • (Incorrect) $28$