Quiz Discussion

The value of the expressions 4/(3*(2-1)) and 4/3*(2-1) is the same.

Course Name: Python

  • 1]

    True

  • 2]

    False

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

float(22//3+3/3)

 

  • 1]

    8

  • 2]

    8.0

  • 3]

    8.3

  • 4]

    8.33

Solution
2
Discuss

What is the output of this expression, 3*1**3?

  • 1]

    23

  • 2]

    13

  • 3]

    1

  • 4]

    3

Solution
3
Discuss

Operators with the same precedence are evaluated in which manner?

  • 1]

    Left to Right

  • 2]

    Right to Left

  • 3]

    Can’t say

  • 4]

    None of the mentioned

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

What will be the output of the following Python code?

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

 

  • 1]

    he

  • 2]

    olleh

  • 3]

    lo

  • 4]

    hello

Solution
6
Discuss

Which is the correct operator for power(xy)?

  • 1]

    X^y

  • 2]

    X**y

  • 3]

    X^^y

  • 4]

    None of the mentioned

Solution
7
Discuss

What will be the output of the following Python code snippet?

def example(a):
    a = a + '2'
     a = a*2
    return a
>>>example("hello")

 

  • 1]

    indentation Error

  • 2]

    cannot perform mathematical operation on strings

  • 3]

    hello2

  • 4]

    hello2hello2

Solution
8
Discuss

Which of these in not a core data type?

  • 1]

    Lists

  • 2]

    Dictionary

  • 3]

    Tuples

  • 4]

    Class

Solution
9
Discuss

What is the average value of the following Python code snippet?

>>>grade1 = 80
>>>grade2 = 90
>>>average = (grade1 + grade2) / 2

 

  • 1]

    85.0

  • 2]

    85.1

  • 3]

    95.0

  • 4]

    95.1

Solution
10
Discuss

What data type is the object below?

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

 

  • 1]

    list

  • 2]

    dictionary

  • 3]

    array

  • 4]

    tuple

Solution
# Quiz