Quiz Discussion

Which is the correct operator for power(xy)?

Course Name: Python

  • 1]

    X^y

  • 2]

    X**y

  • 3]

    X^^y

  • 4]

    None of the mentioned

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 is the value of the following expression?

2+4.00, 2**4.0

 

  • 1]

    (6.0, 16.0)

  • 2]

    (6.00, 16.00)

  • 3]

    (6, 16)

  • 4]

    (6.00, 16.0)

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

The one’s complement of 110010101 is:

  • 1]

    001101010

  • 2]

    110010100

  • 3]

    110010101

  • 4]

    001101011

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

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
7
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
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

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

  • 1]

    True

  • 2]

    False

Solution
10
Discuss

What is the return value of trunc()?

  • 1]

    int

  • 2]

    bool

  • 3]

    float

  • 4]

    None

Solution
# Quiz