Discover
Create +
log in
Home
Trending
Quizzes
Stories
Questions
Polls
Pages
Create
Quizzes
Stories
Polls
Questions
Pages
Home
Trending
Sign in
Fun with Python — Scored Quiz — Qfeast
Quizzes
›
Computers
›
Computer Languages
Fun with Python
by
ghostman
Test your knowledge about Python programming language with this fun quiz!
Published
0 of 12 answered
Stacked
Which of the following is NOT a Python data type?
1/12
Choose one
Integer
String
Boolean
Object
What is used to define a block of code in Python?
2/12
Choose one
Brackets
Curly braces
Indentation
Semicolons
Which of the following is a Python keyword to define a function?
3/12
Choose one
create
define
function
def
What is the output of the following code? print(3 + 5 * 2)
4/12
Choose one
16
13
11
9
Which of the following is used to comment a single-line in Python?
5/12
Choose one
//
#
--
-->
What will the following code print? print('Hello' + 'World')
6/12
Choose one
HelloWorld
Hello World
'Hello' 'World'
Hello, World
Which module is used for working with regular expressions in Python?
7/12
Choose one
re
regex
regexp
regexpy
What is the output of the following code? print(len('Python'))
8/12
Choose one
5
6
7
8
Which of the following is used to open a file in Python?
9/12
Choose one
open()
file()
start()
read()
What does the 'else' clause do in a Python 'if' statement?
10/12
Choose one
It specifies the condition to be checked
It is executed if the condition is true
It is executed if the condition is false
It is executed regardless of the condition
What is the correct way to create a dictionary in Python?
11/12
Choose one
dict = {1: 'apple', 2: 'banana'}
dict = [1=['apple'], 2=['banana']}
dict = (1='apple', 2='banana')
dict = {1, 'apple', 2, 'banana'}
Which of the following is used to convert a string to uppercase in Python?
12/12
Choose one
to_upper()
upper()
uppercase()
convert_up()
Favorite Quiz
0.0 (0)
Bookmark
GH
ghostman
FOLLOW
You might also like
Trending Quizzes