🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Quiz de programmation Python
10 Questions
1 Views

Quiz de programmation Python

Created by
@ComprehensiveDiscernment

Podcast Beta

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Quel est le résultat de l’instruction print 2 + 2==4 en Python?

  • True (correct)
  • 4
  • False
  • Erreur
  • Quelle est la sortie de ces instructions Python si l’utilisateur saisit 22. age=input() ; print(age+8)?

  • Erreur (correct)
  • 30
  • 22
  • 8
  • Quel est le résultat de l'expression True and False en Python?

  • True
  • 0
  • 1
  • False (correct)
  • En Python, le type d’une variable ne peut pas changer pendant l'exécution du programme.

    <p>Vrai</p> Signup and view all the answers

    À quoi sert l'instruction continue en Python?

    <p>À ignorer le reste du code dans la boucle et passer à l'itération suivante</p> Signup and view all the answers

    Quelle est la sortie du code suivant en Python . for i in range(3): print(i,end=''); break else: print(2)

    Signup and view all the answers

    Quelle est la sortie de l’instruction suivante en Python: print('Bonjour, monde.'[:3])

    <p>Bon</p> Signup and view all the answers

    Comment peut-on obtenir un nombre flottant aléatoire entre 0 et 1 avec le module random en Python?

    <p>random()</p> Signup and view all the answers

    Quelle est la fonction du module random qui génère un entier aléatoire entre 5 (inclus) et 10 (exclus) en Python?

    <p>randint(5,10)</p> Signup and view all the answers

    Quelle est la sortie du code suivant en Python: if(True): print(1//2)

    <p>0</p> Signup and view all the answers

    More Quizzes Like This

    Python Syntax and Basics
    5 questions
    Python Syntax and Linters Quiz
    13 questions
    Python Basic Syntax Quiz
    6 questions
    Python Basics MCQ Quiz
    5 questions
    Use Quizgecko on...
    Browser
    Browser