Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Dick Baldwins Tut Question re While Loop
Old
legend_018
Guest
 
Status:
Posts: n/a
Default Dick Baldwins Tut Question re While Loop - 09-26-2008, 05:01 PM

I was just wondering. There are some examples that look like this:

while ((grade >=0) ect.


My question is: Can you put a relational expression inside the conditional clause of the while. like a grade< 1 || grade > 100

I can't write the whole thing because it keeps giving me an error when I click on submit new thread.

Last edited by legend_018; 09-26-2008 at 07:02 PM.
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 09-27-2008, 09:24 AM

Quote:
Originally Posted by legend_018 View Post
I was just wondering. There are some examples that look like this:

while ((grade >=0) ect.


My question is: Can you put a relational expression inside the conditional clause of the while. like a grade< 1 || grade > 100

I can't write the whole thing because it keeps giving me an error when I click on submit new thread.
You can put properly formatted relational expressions inside the conditional clause of a while loop.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
legend_018
Guest
 
Status:
Posts: n/a
Default 09-27-2008, 01:18 PM

Great Thanks
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.