python

What is a correct syntax to output "Hello World" in Python?
print("Hello World")
print(Hello World)
print Hello World
print'Hello World'
How to add comment in python?
#This is a comment
/*This is a comment*/
//This is a comment
which one is NOT a legal variable name?
my_var
12myvar
Myvar
myvar12
How to create a variable with the value 5?
x = int(5)
x = 5
Both are correct
How to check the type of data inside a variable?
print(typeOf(x))
print(typeOf x)
print(type(x))
print(typex)
How to create a function in python?
create myFunction():
def myFunction():
function myFunction():
In python 'Hello' is the same as "Hello"
True
False
Which method can be used to return a string in upper case letters?
toUpperCase()
upperCase()
upper()
uppercase()
which method can be used to replace parts of a string?
replaceString()
repl()
replace()
switch()
Which of the following is a list?
["a","b","c","d"]
{"a","b","c","d"}
("a","b","c","d")
{"a":"b","c":"d"}
Which of the following is a dictionary?
["a","b","c","d"]
{"a","b","c","d"}
("a","b","c","d")
{"a":"b","c":"d"}
Which collection is ordered, changeable, and allows duplicate members?
tuple
set
list
dictionary
which of the following does not allow duplicate entries?
tuple
list
set
dictionary
which one of these is NOT a data type?
int
set
dictionary
function
which of the following does not use index to store data?
String
List
Set
Dictionary
0
{"name":"python", "url":"https://www.quiz-maker.com/QRY965LRE","txt":"What is a correct syntax to output \"Hello World\" in Python?, How to add comment in python?, which one is NOT a legal variable name?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker