+0  
 
0
71
2
avatar

If x is an element of the set{-1,1,2}and y is an element of , {-2,-1,0,1,2}how  many distinct values of x^y are positive?

 Dec 20, 2019
 #1
avatar
0

Looking at cases x = -1, x = 1, and x = 2, there are 9 values of x^y that are positive.

 Dec 20, 2019
 #2
avatar
+1

listforeach(x, a=(-1, 1, 2), listforeach(y, b=(-2, -1, 0, 1, 2), c=x^y

 

OUTPUT =(1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 0.25, 0.5, 1, 2, 4) = 13  positive values.

 

But only 5 are DISTINCT =0.25, 0.5, 1, 2, 4

 Dec 20, 2019

18 Online Users

avatar