473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

logical AND operator question

105 100+
I need to rewrite these two lines of the following statement using the logical AND operator...what should it look like?

if grade >= 70 then
if grade < 80 then
printstudentname, grade
endif
endif
Oct 21 '07 #1
2 2817
ilikepython
844 Expert 512MB
I need to rewrite these two lines of the following statement using the logical AND operator...what should it look like?

if grade >= 70 then
if grade < 80 then
printstudentname, grade
endif
endif
Expand|Select|Wrap|Line Numbers
  1. if grade >= 70 and grade < 80:
  2.     print studentname, grade
  3.  
  4. // or...
  5.  
  6. if 70 <= grade < 80:
  7.     print studentname, grade
  8.  
Oct 21 '07 #2
jmarcrum
105 100+
thanks so much dude, it works great!!
Oct 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nagib Abi Fadel | last post by:
Is there a XOR logical operator in Postgresql, or a function for XOR ?? I only found in the docs a Binary XOR (#). I need to do the following checkup: (field1 is NULL XOR field2 is NULL XOR...
80
by: Christopher Benson-Manica | last post by:
Of course one can get the effect with appropriate use of existing operators, but a ^^ operator would make for nice symmetry (as well as useful to me in something I'm working on). Am I the only one...
8
by: Chua Wen Ching | last post by:
Hi, I had some beginner questions. Do we need Shift << >> or Logical AND OR XOR operator in our daily programming? I am not sure why i need to use it? I had some samples of c# codes using it. ...
23
by: Cor | last post by:
Hi group, A question to the group, would it not be for a lot of the users better when there was beside "Option strict on" an "Option logical Strict on". I was automaticaly writting...
2
by: ThunderMusic | last post by:
Hi, I have a value that contains flags that I must get using a bitmask. I tryied with the && operator, but the compiler outputs this error : Operator '&&' cannot be applied to operands of type...
10
by: Jonathan | last post by:
Hi all, I'm having an argument with a co-worker about the difference between the & and && operators when applied to boolean operands in C#. His point of view is that the expression (false &...
9
by: marko | last post by:
/* code start */ int a = 0; /* expected evaluation and excution order with precedence in mind /* False(3) , True(1), False(2) */ if ( (a=1) == 0 || 0 != 1 && (a =2) == 1) putchar('T');...
3
by: gallows | last post by:
Hi, I wondering if there is a standard specification for evalutation of logical expressions. For instance: if (p != NULL && strlen(p) x ) do_something(); If p is actually NULL, should this...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.