1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is a correct syntax to output "Hello World" in Python?
print("Hello World")
How do you insert COMMENTS in Python code?
#This is a comment
Which one is NOT a legal variable name?
my-var
What is the correct file extension for Python files?
.py
What is the correct syntax to output the type of a variable or object in Python?
print(type(x))
What is the correct way to create a function in Python?
def myFunction();
In Python, 'Hello', is the same as "Hello"
True
Which operator is used to multiply numbers?
*
Which operator can be used to compare two values?
==
Which of these collections defines a LIST?
["apple", "banana", "cherry"]
Which of these collections defines a TUPLE?
("apple", "banana", "cherry")
Which of these collections defines a SET?
{"apple", "banana", "cherry"}
Which of these collections defines a DICTIONARY?
{"name" : "apple", "color" : "green"}
How do you start writing an if statement in Python?
if x > y:
How do you start writing a while loop in Python?
while x > y:
How do you start writing a for loop in Python?
for x in y:
Comments in Python are written with a special character, which one?
#
To verify the type of any object in Python
type()
What character does Float use to indicate the power of 10.
e
what character does complex numbers are written with?
j