Font size
WorksheetsCodeAcademy Python Test
Total questions: 10
Worksheet time: 6mins
What programming language is popular in 2024?
Python
Scratch
C++
C#
HTML
C++ is a...
(a)
How can we talk in Python?
print ("Hello")
printf("Hello)
print("Hello")
print <fuction> sp"
What is the output of the following Python code?
x = 5
y = 3
print(x + y)
8
15
53
2
Which data type is used to store a single character in Python?
int
char
string
float
What is the correct way to comment a single line in Python?
// This is a comment
/* This is a comment */
# This is a comment
%% This is a comment
What is the correct way to define a function in Python?
def my_function():
function my_function():
define my_function():
function = my_function():
How can we check the length of a list in Python?
len(list_name)
length(list_name)
size(list_name)
count(list_name)
Which statement is used for conditional execution in Python?
for
if
while
switch
Which loop is used for iterating over a sequence in Python?
for
if
while
switch
