forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice


Warmup-1 > pos_neg
prev  |  next  |  chance

Given 2 int values, return True if one is negative and one is positive. Except if the parameter "negative" is True, then return True only if both are negative.

pos_neg(1, -1, False) → True
pos_neg(-1, 1, False) → True
pos_neg(-4, -5, True) → True

...Save, Compile, Run (ctrl-enter)

def pos_neg(a, b, negative):

Editor font size %:
Shorter output

Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 124.0

Copyright Nick Parlante 2017 - privacy