Question
What will be produced by the following code fragment?
def choose(x, y):
if x > y
return True
return False
print(choose(2, 2))
Question
What will be produced by the following code fragment?
def choose(x, y):
if x == y:
return True
return False
print(choose(2, 2))
Question
What will be produced by the following code fragment?
def choose(x, y):
if x == y:
return True
return False
print(choose(1, 2))
Question
What will be produced by the following code fragment?
def choose(x):
if x == 2:
return True
print(choose(2))
Question
What will be produced by the following code fragment?
def choose(x):
if x == 2:
return True
print(choose(3))
Question
In the box provided, enter the value that will be produced by the following code fragment:
x = 3
y = 10
if x > 0:
y = 12
y = y + 5
print(y)
Question
In the box provided, enter the value that will be produced by the following code fragment:
x = -3
y = 10
if x > 0:
y = 12
y = y + 5
print(y)
Question
In the box provided, enter the value that will be produced by the following code fragment:
x = -3
y = 10
if x > 0:
y = 12
y = y + 5
print(y)
Question
Select all values of y
for which the following code will produce the value "Yes"
. There may be more than one correct choice.
def choose(x):
if not x < 5:
return "Yes"
else:
return "No"
print(choose(y))
Question
Select all values of y
for which the following code will produce the value "No"
. There may be more than one correct choice.
def choose(x):
if x < 5 or x > 90:
return "Yes"
else:
return "No"
print(choose(y))