ALL BUSINESS DATA ANALYSIS ENGLISH ARTICLES PYTHON

Python Quiz (30 Multiple Choice Questions) with Score, Skill Level and Bar Graph

Python Quiz

Take the test

1) What is the output?

print(type([]) is list)



2) What will this print?

x = [1,2,3]
y = x
y.append(4)
print(x)



3) Which creates a set with one element?




4) What does this output?

def f(a, b=10):
    return a + b

print(f(5))



5) Correct exception handling?




6) Is Python dynamically typed?




7) What is the output?

print(bool(""))



8) Which is immutable?




9) What does len({1,2,2,3}) return?




10) Output?

print(3 * "a")



11) Which keyword creates a function?




12) What is returned by print()?




13) Which creates a dictionary?




14) Output?

print(type(5))



15) Which is a Python boolean?




16) What is the output?

print(bool(0))



17) Which operator checks equality?




18) What does this return?

len("Python")



19) Which is a valid list?




20) Output?

print(type(True))



21) Which keyword exits a loop?




22) What does this print?

print(10 // 3)



23) Which is a tuple?




24) Output?

print(bool(" "))



25) Which creates an empty list?




26) What is the output?

print(type(None))



27) Which is a Python comment?




28) What does this return?

type("3")



29) Which is NOT a Python data type?




30) Output?

print(bool([]))



Views: 4

Comments are closed.

Pin It