To draw a circle of diameter 10 with filled color red, use _________.<
Practice Python Graphics Questions – To draw a circle of diameter 10 with filled color red, use _________.
Practice Python Graphics Questions – To draw a circle of diameter 10 with filled color red, use _________.
Practice Functions Programming – A function with no return statement returns ______.
Practice Type Conversion Questions – Which of the following functions return 4.
Practice Inbuilt Functions Questions – What is math.sin(math.pi / 6)?
Practice for loop Questions – How many times is the print statement executed?
for i in range(10):
for j in range(i):
print(i * j)
Practice while loop Questions – What will be displayed by after the following loop terminates?
number = 25
isPrime = True
i = 2
while i < number and isPrime:
if number % i == 0:
isPrime = False
i += 1
print(“i is”, i, “isPrime is”, isPrime)
Practice Lists programming – Suppose list1 is [1, 3, 2, 4, 5, 2, 1, 0], Which of the following is correct?
Practice for loop Questions – Which of the following loops prints “Welcome to Python” 10 times?
A:
for count in range(1, 10):
print(“Welcome to Python”)
B:
for count in range(0, 10):
print(“Welcome to Python”)
C:
for count in range(1, 11):
print(“Welcome to Python”)
D:
for count in range(1, 12):
print(“Welcome to Python”)
Practice Logical Operators Questions – Assume x = 4 and y = 5, Which of the following is true?
Practice Lists programming – What will be displayed by the following code?
def f(value, values):
v = 1
values[0] = 44
t = 3
v = [1, 2, 3]
f(t, v)
print(t, v[0])
Practice Expressions Questions – What will be displayed by the following code?
x = 1
x = x + 2.5
print(x)
Practice Lists programming – What will be displayed by the following code?
def f(value, values):
v = 1
values[0] = 44
t = 3
v = [1, 2, 3]
f(t, v)
print(t, v[0])
Practice for loop Questions – Which of the following loops correctly computes 1/2 + 2/3 + 3/4 + … + 99/100?
A:
sum = 0
for i in range(1, 99):
sum += i / (i + 1)
print(“Sum is”, sum)
B:
sum = 0
for i in range(1, 100):
sum += i / (i + 1)
print(“Sum is”, sum)
C:
sum = 0
for i in range(1.0, 99.0):
sum += i / (i + 1)
print(“Sum is”, sum)
D:
sum = 0
for i in range(1.0, 100.0):
sum += i / (i + 1)
print(“Sum is”, sum)
Practice Tkinter Questions – How do you create a frame?
Practice File Operations Questions – Whihc function do you use to write data to perform binary output?