|Bill Allombert on Thu, 08 Dec 2011 19:33:41 +0100|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: Compute the value of the function|
On Thu, Dec 08, 2011 at 02:51:42PM +0100, sumaia.saad-eddin wrote: > Good morning > > I have the function f(x,a,b), I would like to compute the value of > this function under the condition ((x-1)*b \leq a \leq 2*x*b), > I write > > if(a>2*x*b, print("a<=2*x*b is not required, [a,b,x] = ",[a,b,x]),); > > My problem is that I do not know how can I add the second condition > ((x-1)*b \leq a ) You can use && ("and") or || ("or") or even nested if() statements. Cheers, Bill.