Question: Using Python Question1: Fix the Bug The following snippet of code doesn't work! Figure out what is wrong and fix the bugs. def both_positive (x,

Using Python

Question1: Fix the Bug

The following snippet of code doesn't work! Figure out what is wrong and fix the bugs.

def both_positive(x, y):

"""Returns True if both x and y are positive.

>>> both_positive(-1, 1)

False

>>> both_positive(1, 1)

True

"""

return x and y > 0 # You can replace this line!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!