Positive and Even
Programming Questions
Positive and Even
You are given a function positive_and_even, with input int a. You are to return the following:
If the variable a is even and positive, return the string "satisfactory", otherwise return the string "unsatisfactory".
Input:
- a: An integer
Example 1:
positive_and_even(-6) = "unsatisfactory"
Example 2:
positive_and_even(5) = "unsatisfactory"
Example 3:
positive_and_even(10) = "satisfactory"
Tests - Login / Sign up to submit your code!
Efficiency
Test Case 1
Test Case 2
Test Case 3
Test Case 4
Test Case 5
Test Case 6
Test Case 7
Test Case 8
Test Case 9
Test Case 10
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results
Submit to See Results