NEW
Font size
WorksheetsPython Basics
Total questions: 10
Worksheet time: 6mins
Which type of Programming does Python support?
object-oriented programming
structured programming
functional programming
all of the mentioned
How do you insert COMMENTS in Python code?
//
#
/*
What is a correct syntax to output "Hello World" in Python?
echo"Hello World"
echo("Hello World")
p "Hello World"
print("Hello World")
What is the output of the following code?
str = "pynative"
print (str[1:3])
py
yn
pyn
yna
Which of the following is used to define a block of code in Python language?
Key
Brackets
Indentation
All of the mentioned
How do you create a variable with the numeric value 5?
int a = 5
Both answers are correct
a=5
What is the output of the following
x = 36 / 4 (3 + 2) 4 + 2
print(x)
182.0
37
117
The Program executed with errors
What will be the output of the following Python code?
i = 1
while True:
if i%3 == 0:
break
print(i)
i + = 1
1 2 3
error
1 2
none of the mentioned
Which one is NOT a legal variable name?
_myvar
my-var
MyVar
My_Var
What does pip stand for python?
unlimited length
all private members must have leading and trailing underscores
Preferred Installer Program
none of the mentioned
