Quiz Discussion

 Evaluate the expression given below if A = 16 and B = 15.

A % B // A

 

Course Name: Python

  • 1]
    0.0
  • 2]

    0

  • 3]

    1.0

  • 4]

    1

Solution
No Solution Present Yet

Top 5 Similar Quiz - Based On AI&ML

Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api

# Quiz
1
Discuss

The expression Int(x) implies that the variable x is converted to integer.

  • 1]

    True

  • 2]

    False

Solution
2
Discuss

In order to store values in terms of key and value we use what core data type.

  • 1]

    tuple

  • 2]

    list

  • 3]

    class

  • 4]

    dictionary

Solution
3
Discuss

In python we do not specify types, it is directly interpreted by the compiler, so consider the following operation to be performed.

>>>x = 13 ? 2

the objective is to make sure x has an integer value, select all that apply

  • 1]

    x = 13 // 2

  • 2]

    x = int(13 / 2)

  • 3]

    x = 13 % 2

  • 4]

    All of the mentioned

Solution
4
Discuss

Which of the following results in a SyntaxError?

  • 1]

     ‘”Once upon a time…”, she said.’

  • 2]

    “He said, ‘Yes!'”

  • 3]

    ‘3\’

  • 4]

     ”’That’s okay”’

Solution
5
Discuss

It is not possible for the two’s complement value to be equal to the original value in any case.

  • 1]

    True

  • 2]

    False

Solution
6
Discuss

Which one of these is floor division?

  • 1]

    /

  • 2]

    %

  • 3]

    //

  • 4]

    None of the mentioned

Solution
7
Discuss

Mathematical operations can be performed on a string.

  • 1]

    True

  • 2]

    False

Solution
8
Discuss

Which of the following operators has its associativity from right to left?

  • 1]

    +

  • 2]

    //

  • 3]

    %

  • 4]

    **

Solution
9
Discuss

Given a function that does not return any value, What value is thrown by default when executed in shell.

  • 1]

    int

  • 2]

    bool

  • 3]

    void

  • 4]

    None

Solution
10
Discuss

The following is displayed by a print function call. Select all of the function calls that result in this output.

tom
dick
harry

 

  • 1]

    print(”’tomdickharry”’)

  • 2]
    print('''tom
    \ndick
    \nharry''')
  • 3]
    print('tom
    dick
    harry')
  • 4]

    print(‘tom\ndick\nharry’)

Solution
# Quiz