id/email
password
forgot password
about | help | done | prefs | create account
CodingBat code practice

Python > Warmup-1 > pos_neg
prev  |  next  |  chance

Given 2 int values, return True if one is negative and one is positive. Unless the parameter "negative" is True, then they both must be negative.

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

...Save, Compile, Run         

See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean


prev  |  next  |  chance   |  CodingBat  >  Warmup-1

Forget It! -- delete my code for this problem 124.0

Copyright Nick Parlante 2006-10 - privacy