What is the output of print(.84) ____
Deduce the output of the following code:
print('eval("10%12")')
_ operator is used to find the semantic difference of two sets.
Deduce the output of the following code:
a=1
b=2
c=3
print("{2}{0}{2}{1}".format(a,b,c))
What will be the output of the following Python code?
>>>t=(1,2,4,3)
>>>t[1:3]
What will be the output of the following Python code?
a=[1,2,3,4]
b=[sum(a[0:x+1]) for x in range(0,len(a))]
print(b)
What type of code does the DRY (Don't Repeat Yourself) principle promote?
What will be the output of the following Python code?
x = [34, 56]
print((''.join(list(map(str, x)))),)
What is the minimum value printed by the following code?3
from itertools import count
for i in count(3):
print(i)
if i>=5:
break
What is the output of the following code?
def greetPerson(*name):
print('Hello', name)
greetPerson('Frodo', 'Sauron')