Quiz Discussion

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

Course Name: Python

  • 1]

    +

  • 2]

    //

  • 3]

    %

  • 4]

    **

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

What will be the output of the following Python code?

>>>str="hello"
>>>str[:2]
>>>

 

  • 1]

    he

  • 2]

    olleh

  • 3]

    lo

  • 4]

    hello

Solution
2
Discuss

What data type is the object below?

L = [1, 23, 'hello', 1]

 

  • 1]

    list

  • 2]

    dictionary

  • 3]

    array

  • 4]

    tuple

Solution
3
Discuss

What is the order of precedence in python?

i) Parentheses
ii) Exponential
iii) Multiplication
iv) Division
v) Addition
vi) Subtraction

  • 1]

    i,ii,iii,iv,v,vi

  • 2]

    ii,i,iii,iv,v,vi

  • 3]

    ii,i,iv,iii,v,vi

  • 4]

    i,ii,iii,iv,vi,v

Solution
4
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
5
Discuss

What is the value of the following expression?

8/4/2, 8/(4/2)

 

  • 1]

    (1.0, 4.0)

  • 2]

    (1.0, 1.0)

  • 3]

    (4.0. 1.0)

  • 4]

    (4.0, 4.0)

Solution
6
Discuss

What is the value of the following expression?

float(22//3+3/3)

 

  • 1]

    8

  • 2]

    8.0

  • 3]

    8.3

  • 4]

    8.33

Solution
7
Discuss

What are the values of the following Python expressions?

 2**(3**2)
 (2**3)**2
 2**3**2

 

  • 1]

    64, 512, 64

  • 2]

    512, 512, 512

  • 3]

    512, 64, 512

  • 4]

    64, 64, 64

Solution
8
Discuss

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

A % B // A

 

  • 1]
    0.0
  • 2]

    0

  • 3]

    1.0

  • 4]

    1

Solution
9
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
10
Discuss

The one’s complement of 110010101 is:

  • 1]

    001101010

  • 2]

    110010100

  • 3]

    110010101

  • 4]

    001101011

Solution
# Quiz