Quiz Discussion

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

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

Course Name: Python

• 1]

85.0

• 2]

85.1

• 3]

95.0

• 4]

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

What will be the value of the following Python expression?

4 + 3 % 5

• 1]

4

• 2]

7

• 3]

2

• 4]

0

Solution
2
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
3
Discuss

What will be the value of x in the following Python expression?

x = int(43.55+2/2)

• 1]

43

• 2]

44

• 3]

22

• 4]

23

Solution
4
Discuss

The one’s complement of 110010101 is:

• 1]

001101010

• 2]

110010100

• 3]

110010101

• 4]

001101011

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

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

• 1]

True

• 2]

False

Solution
7
Discuss

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

• 1]

True

• 2]

False

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

What is the answer to this expression, 22 % 3 is?

• 1]

8

• 2]

1

• 3]

0

• 4]

2

Solution
10
Discuss

Which one of these is floor division?

• 1]

/

• 2]

%

• 3]

//

• 4]

None of the mentioned

# Quiz