culTest

    One of the 50 questions in this topic

    How much do you know about Python?

    What type of data is the result of the expression 5 / 2 in Python 3?

    Answers

    int
    floatCorrect
    double
    decimal

    In Python 3, division with the / operator always returns a float, even when the result is an integer. Thus, 5 / 2 returns 2.5 (float). For integer division that returns an int, the // operator is used. This is an important difference from Python 2, where / performed integer division by integers.