Logo

Python Questions Set 89:

Quiz Mode

Can the keyword be used as a variable?

1
2

Solution:

Syntax of constructor in Python?

1
2
3

Solution:

What type of data is: a=[(1,1),(2,4),(3,9)]? 

1
2
3
4

Solution:

Python keywords are in which case?

1
2
3
4

Solution:

  What is the output when we execute list(“hello”)?
 

1
2
3
4

Solution:

What is the output of the given code?


def fun():

    s=5

    print(s)

    

s=10

fun()

print(s)

1
2
3
4

Solution:

What will be the output of the following Python code?


x = 123


for i in x:

    print(i)

1
2
3
4

Solution:

What will be the output of the following Python code?

>>> a=(1,2,3,4)
>>> del a[2]

1
2
3
4

Solution:

 What does print(os.geteuid()) print? 

1
2
3
4

Solution: