No student devices needed. Know more
18 questions
What is the output of the following code?
John
123
John
NameError
John
SyntaxError
John
TypeError
What is the output of the following code?
ValueError: range() arg 1 must be greater than zero
MyExamCloudMyExamCloudMyExamCloud
MyExamCloudMyExamCloud
MyExamCloud
What is the output of the following code?
MyExamCloud
MyExamCloud
MyExamCloudMyExamCloud
MyExamCloud
Which method removes all dictionary items?
dictionary.clear()
dictionary.remove()
dictionary.delete()
What is the output of the following code?
Error
[1, 2, 3, 4]
['MyExamCloud', 1, 2, 3, 4, 5]
['MyExamCloud', 1, 2, 3, 4]
[1, 2, 3, 4, 5]
What is the output?
My
Exam
Practice
Cloud
Tests
What is the output of the following code?
['PCEP', 'PCAPPCPP1']
SyntaxError: invalid syntax
['PCEP', 'PCAP', 'PCPP1']
['PCEP']
Which code snippet raises the exception named 'OrderException'?
throws OrderException
throw OrderException
raise OrderException
raises OrderException
Given the following dictionary, which code can add `Zip` as `10001`?
dictionary["Zip"] = "10001"
dictionary.update({"Zip": "10001"})
dictionary[0] = "Zip:10001"
dictionary[0] = ("Zip": "10001")
What is the output of the following code?
5
Error
2
1
What is the value of the obj in the below snippet?
Error
fun
fun:None
None
What is the result of the following code?
The program raises NameError
Print an infinite MyExamCloud
Print a single MyExamCloud
The program displays SyntaxError
What is the immediate superclass of KeyboardInterrupt?
InputException
Exception
BaseException
UserException
Which of the following is true about Python functions?
Python functions strongly demand the presence of return type.
Python functions strongly demand the presence of a pair of parentheses.
Python functions strongly demand the presence of return statements.
What is the output of the following code?
John
John
Welcome Peter
Welcome Peter
Error
Welcome Peter
John
What is the output of the following code?
Python Programming Course from MyExamCloud.
com
Python Programming Course from MyExamCloud
.com
What is the output of the following code?
PCEP PCAP PCPP1
PCEP
PCAP
PCPP1
PCEPPCAPPCPP1
What is the output of the following code?
['My', 'Exam']
My Exam\nCloud
['My', 'Exam', 'Cloud']
MyExamCloud
['My', 'Exam', '\nCloud']
MyExam\nCloud
['My', 'Exam\nCloud']
MyExam
Cloud
Explore all questions with a free account