Skip to content
J2J Institute
Search
K
Main Navigation
Home
Jobs
Code here
Courses
Java
Core
Advanced
Python
SQL
PowerBI
Testing
Manual
Automation
Interview Questions
Java
Python
SQL
Manual
Automation
Quiz
Java
Python
SQL
Appearance
Menu
Return to top
On this page
Beginner level python quiz
What is the correct way to create a dictionary in Python?
{}
[]
()
<>
How do you write an infinite loop in Python?
while True:
for i in range(10):
repeat until 10:
loop()
What function is used to get user input in Python?
input()
get()
read()
scan()
Which operator is used for exponentiation in Python?
^
**
&&
//
What will be the result of the following code: print(10 % 3)?
3
1
10
30
Which of the following is the correct way to import the math module in Python?
import math
include math
using math
import('math')
What is the output of print(type('Hello World')) in Python?
<class 'str'>
<class 'int'>
<class 'bool'>
<class 'list'>
Which of the following methods is used to remove an element from a list in Python?
remove()
delete()
erase()
pop()
Which of the following is the correct way to handle exceptions in Python?
try-except
try-catch
catch-throw
exception-try
What is the default return value of a function that does not explicitly return anything in Python?
None
0
False
Empty
Submit