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

 

amgreyson@gmail.com algebra-1 > isNegative
prev  |  next  |  chance

Given two distinct ordered pairs, return whether the line that passes through them is negative or not negative. The inputs, redPoint and whitePoint, are lists. Each list contains two elements, the first representing the x coordinate, and the second representing the y coordinate of a point. The points are guaranteed not to have a zero or undefined slope.


isNegative([-3.0, 7.0], [9.0, 3.0]) → 'negative'
isNegative([7.0, 13.0], [6.0, 20.0]) → 'negative'
isNegative([-3.0, 8.0], [4.0, 35.0]) → 'not negative'

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

def isNegative(redPoint, whitePoint):

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: 175

Copyright Nick Parlante 2017 - privacy