__ operator is used to perform the union of two sets.
How is the name Django pronounced?
Which of the following is not a data type in python.
In top-down design every module is broken into same number of submodules.
Find the output of the following code:
from itertools import product
x=[1,2,3]
y=list(product(range(2),x))
print(len(y))
Which Python function is used to read the first 4 characters of a file?
Which file is an empty file that tells Python that the current directory should be considered as a Python package?
Deduce the output of the following code:
def fun(l, n):
i = n - 1
while i >= 0:
print(l[i])
i -= 1
x = fun([1, 2, 3, 4], len([5, 6, 7, 8]))
What will be the output of the following Python code?
class Demo:
def check(self):
return "Demo's check"
def display(self):
print(self.check())
class Demo_Derived(Demo):
def check(self):
return "Derived's check"
Demo().display()
Demo_Derived().display()
Compare the following two Python codes shown below and state the output if the input entered in each case is -6?
CODE 1
import math
num=int(input("Enter a number of whose factorial you want to find"))
print(math.factorial(num))
CODE 2
num=int(input("Enter a number of whose factorial you want to find"))
print(math.factorial(num))