Worksheetspython essL2
Total questions: 8
Worksheet time: 4mins
What is a correct syntax to output "Hello World" in Python?
p("hello world)
echo("hello world")
echo "hello world"
print("hello world")
How do you insert COMMENTS in Python code?
// This is comment
#This is comment
/*this is comment /*
""
Which of these collections defines a LIST?
{"apple", "banana", "cherry"}
("apple", "banana", "cherry")
{"name": "apple", "color": "green"}
["apple", "banana", "cherry"]
How do you start writing an if statement in Python?
if (x > y)
if x > y then:
if x > y:
none of the bove
How do you start writing a while loop in Python?
while x > y:
while x > y {
x > y while{
while (x > y)
How do you create a variable with the numeric value 5?
x = int(5)
x = 5
Both the other answers are correct
Which operator is used to multiply numbers?
%
#
*
x
Which operator can be used to compare two values?
><
=
==
<>
