Logo

Python Questions Set 109:

Quiz Mode

>>> a = '10'

>>> b = '20'

>>> a = a + b

>>> print(a)

1
2
3
4

Solution:

 Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]? 

1
2

Solution:

What is the output of the given code?


t=7.0/4.0 == 7/4 

print(t)

1
2
3

Solution:

 

import turtle
t=turtle.Pen()
t.right(90)
t.forward(100)
t.heading()

1
2
3
4

Solution:

What is the output of the following Python statement?


print("abccccdefababbc".count("ab", 1))

1
2
3
4

Solution:

  What does os.link() do  ?

1
2
3
4

Solution:

 Which of the following expressions results in an error? 

1
2
3
4

Solution:

What is the output of the given code?


def sign(n):

    print(n)


    

sign(n='Abekus')

1
2
3
4

Solution:

Which operator is used to check whether a particular element is present in a sequence or not?

1
2
3
4

Solution:

What is the output of the given code?


string="{} {} {}".format('Abekus','learning','madefun')

print(string)

string="{1} {2} {0}".format('Abekus','learning','madefun')

print(string)


1
2
3
4

Solution: