Python

a vibrant and engaging illustration of a person coding in Python, featuring code snippets and learning elements around them

Python Programming Proficiency Quiz

Test your knowledge of Python programming with our comprehensive quiz designed for enthusiasts at all levels. This quiz covers fundamental concepts, data types, and coding practices to provide you with a thorough assessment of your Python skills.

Whether you are a beginner or an experienced coder, this quiz will challenge your understanding and help you learn more:

  • 30 questions covering various aspects of Python
  • Includes multiple choice and checkbox formats
  • Instant feedback on your answers
30 Questions8 MinutesCreated by CodingWizard42
What type of language is Python?
Low Level Programming Language
High Level Programming Language
Machine Level Programming Language
Natural Level Programming Language
Which of the following data types are built in python?
Int
Str
Float
Double
Array
Which of the following are valid variable names?
Xyz1
Xyz_1
Xyz-1
Xyz 1
1xyz
X_y_z_1
What will be the output of the following snippet?
>>> my_var = 20
>>> print(type(my_var))
Class 'int'
Class 'str'
Class 'float'
Class 'number'
What will be the output of the following snippet?
>>> my_var = "a"
>>> print(type(my_var))
Class 'text'
Class 'char'
Class 'str'
Class 'list'
What will be the output of the following snippet?
 
>>> num = 2**3 + (1*7 + 3*1)**2
>>> print(num)
100
123
108
Syntax Error
What will be the output of the following snippet?
 
>>> value = (1, 2, 3)
>>> value[0] = 2
>>> print(value)
(1, 2, 3)
(2, 2, 3)
Error
Cannot predict
What will be the output of the following snippet?
 
>>> value = [1, 2, 3]
>>> value[0] = 2
>>> print(value)

[1, 2, 3]
[2, 2, 3]
Error
Cannot predict
A mutable data type:
Cannot be modified
Can be modified
Can be modified sometimes
Cannot say
A string in python is
Immutable
Mutable
Made from character data types
String does not exist in python
What will be the output of the following code?
 
Screenshot from 2022-12-15 14-09-18
 
 
Num is big
Num is small
Syntax Error
The output of the following code is:
 
define my_func(x):
    return x + 5
 
print(my_func(2))
2
5
Syntax Error
None
The output of the following code is:
 
def my_func(x):
    return x + 5
 
print(my_func(2))
2
5
7
Syntax Error
None
The code inside a function is executed when:
The function is defined
The function is called
A function does not have code inside it
I don't know what functions are
How many arguments are passed in the function f?
 
f(1, 5, 2, -1, 0)
0
4
5
3
2
Which of the following are valid function calls for func?
 
def func(a=1, b=1):
   print(a, b)
 
 
Func()
Func(5)
Func(7, 8)
Func(10, 12, 13)
Func(a=2, b=2)
Func(b=2, 11)
The output of the snippet is:
 
a = [1, 2, 3, 4, 5]
sum = 0

for ele in a:
    sum += ele

print(sum)
15
0
Error
It makes the computer explode
What will be the output of the following code snippet?

count = 0 while(True): if count % 3 == 0: print(count, end = " ") if(count > 15): break; count += 1
0 3 6 9 12 15
0 3 6 9 12
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Infinite loop
What is the output of?
{'name': 'c++'}
{'name': 'Python'}
Can't say
Error
Classes are
Created from objects
Used to create objects
Are used to create new programming languages
Not available in python
Objects are created using:
Classes
Functions
The pass keyword
The return keyword
What is the output of the following code?
No output
Initializing...
Syntax Error
The output is:
Initializing...
No Output
Syntax Error
To overload the "+" operator, which dunder do we have to create?
__add__
__sub__
__plus___
__+__
Which of the following is a dunder?
_init_
__init_
_init__
__init__
The output is:
Class
Class '__main__.A'
__main__.A object at 0x7fd3a19b64c0
The program won't run
The output is:
[0, 2, 4, 6]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[0, 2, 4, 6, 8]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
The output is:
 
0
2
4
3
5
The output is:
 
False
True
None
Error
Which syntax is used to import the class Matrix from the file my_matrix_module.py?
From matrix import Matrix
From my_matrix_module import my_matrix_module
From my_matrix_module import Matrix
From Matrix import my_matrix_module
{"name":"Python", "url":"https://www.supersurvey.com/QPREVIEW","txt":"Test your knowledge of Python programming with our comprehensive quiz designed for enthusiasts at all levels. This quiz covers fundamental concepts, data types, and coding practices to provide you with a thorough assessment of your Python skills.Whether you are a beginner or an experienced coder, this quiz will challenge your understanding and help you learn more:30 questions covering various aspects of PythonIncludes multiple choice and checkbox formatsInstant feedback on your answers","img":"https:/images/course8.png"}
Powered by: Quiz Maker