Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
What is the output of the following code?
x = "Hello World" print(x[4])
H
e
l
o
function_name(arguments):
def function_name(arguments):
function_name(arguments)
None of the above
==
>
<
+
x = [1, 2, 3] y = x y[0] = 4 print(x)
[1, 2, 3]
[4, 2, 3]
[1, 4, 3]
[1, 2, 4]
int(string)
str(int)
string.int()
All of the above
x = 3 if x > 5:print("x is greater than 5") elif x > 2:print("x is greater than 2") else:print("x is less than or equal to 2")
x is greater than 5
x is greater than 2
x is less than or equal to 2
Which of the following is an advantage of using Python?
Easy to learn and use
Low-level access to system resources
Better performance than other programming languages
Limited library support
Integer
Float
Double
String
Which of the following is a valid variable name in Python?
123var
_variable
class
2_for_1
List