Which of the following statements is true about Python?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which statement correctly defines a variable in Python?
What is the output of the following code?
x = 5
y = 2
print(x / y)
Which of the following is not a valid Python comment?
Which of the following is not a valid way to write a string in Python?
Which of the following is not a built-in data type in Python?
What is the output of the following code?
x = 10
y = 5
print(x + y)
What is the output of the following code?
x = "Hello"
y = "World"
print(x + " " + y)
What is the output of the following code?
x = 5
y = 2
print(x % y)
What is the output of the following code?
x = [1, 2, 3]
x.append(4)
print(len(x))
What is the output of the following code?
x = (1, 2, 3)
y = list(x)
print(y[1])
What will be the output of the following code?
x = 5
y = 2
z = x / y
print(z)
What will be the output of the following code?
x = "Hello, World!"
print(x[7:12])
What will be the output of the following code?
x = [1, 2, 3]
x.remove(2)
print(x)
What will be the output of the following code?
x = [1, 2, 3]
y = x + [4, 5]
print(y)
What will be the output of the following code?
x = (1, 2, 3)
y = x[1:]
print(y)