Question: Using Python Q1: 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
Q1: 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
Get step-by-step solutions from verified subject matter experts
