The event _____________ is fired when the right mouse button is releas
Practice Tkinter Questions – The event _____________ is fired when the right mouse button is released.
Practice Tkinter Questions – The event _____________ is fired when the right mouse button is released.
Practice Strings Questions – Given a string s = “Welcome”, which of the following code is incorrect?
Practice Tkinter Questions – Assume v1 = IntVar(), how do you set a new value 5 to v1.
Practice for loop Questions – Given the following four patterns,
Pattern A Pattern B Pattern C Pattern D
1 1 2 3 4 5 6 1 1 2 3 4 5 6
1 2 1 2 3 4 5 2 1 1 2 3 4 5
1 2 3 1 2 3 4 3 2 1 1 2 3 4
1 2 3 4 1 2 3 4 3 2 1 1 2 3
1 2 3 4 5 1 2 5 4 3 2 1 1 2
1 2 3 4 5 6 1 6 5 4 3 2 1 1
Which of the pattern is produced by the following code?
for i in range(1, 6 + 1):
for j in range(6, 0, –1):
print(j if j <= i else” “, end = ” “)
print()
Practice Polymorphism Questions – What will be displayed by the following code?
class A:
def __str__(self):
return“A”
class B(A):
def __init__(self):
super().__init__()
class C(B):
def __init__(self):
super().__init__()
def main():
b = B()
a = A()
c = C()
print(a, b, c)
main()
Practice File Operations Questions – To read the next line of the file from a file object infile, use _________.
Practice Input-output Questions – The format function returns _______.
Practice Relational Operators – Which of the following code displays the area of a circle if the radius is positive.
Practice Python Basics Questions – To start Python from the command prompt, use the command ________.
Practice Inheritance Questions – To check whether an object o is an instance of class A, use _________.
Practice Tuples Questions – Suppose t = (1, 2, 4, 3), t[1 : 3] is _________.
Practice Class Relationships – What relationship is appropriate for Account and Savings Account?
Practice Classes and Objects – The keyword __________ is required to define a class.
Practice Polymorphism Questions – What will be displayed by the following code?
class A:
def __str__(self):
return“A”
class B(A):
def __init__(self):
super().__init__()
class C(B):
def __init__(self):
super().__init__()
def main():
b = B()
a = A()
c = C()
print(a, b, c)
main()
Practice Tkinter Questions – Assume v1 = IntVar(), how do you create a check button under parent frame1 with variable bound to v1?