Search Header Logo

Quiz 2

Authored by Wai Li

Information Technology (IT)

University

Used 1+ times

Quiz 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What is the result of this expression?

8//3

2.6
2
3
2.0

2.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which statement correctly assigns the value 10 to variable x?

10 -> x
x == 10
x := 10
x = 10

3.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What is the output of this code?

x = 3

y = 7

print(x > 2 and y < 10)

True
False
Error
None

4.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What will this expression return?

not (4 > 2)

True
False
4
2

5.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

Which of the following is NOT a comparison operator in Python?

>=
!=
+=
==

6.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What type of value does input() return by default?

Integer
Float
Boolean
String

7.

MULTIPLE CHOICE QUESTION

30 mins • 1 pt

What does the following code do?

if True:

pass

else:

print("Wrong")

It prints "Wrong"
It causes an error
It does nothing
It prints "pass"

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?