PDA

View Full Version : Lab 2 done


rmagicflo
02-22-2015, 11:00 AM
Lab 2 was not very hard until the If statement with three "yes". I was lost until I asked the instructor. He provided this:

var cont = 1
while (cont==1)
{
Object jump
var resp = prompt("Do you want to continue?");
if (resp=="YES" or resp=="Yes" or resp=="yes")
{
cont=1
}
else
{
cont=0
}
}//end while[/SIZE]

Thank you. I understand a little more everyday.

WindowsManic
02-26-2015, 05:34 AM
I wish their was a select case syntax in Alice. I am using three if statements to do the trick. I think nesting the if statements is harder in Alice then C++\C. Maybe it just because I am more used to coding with it then Alice. Good Job!

cmachua
06-24-2015, 01:02 AM
this helped me a lot, thanks for sharing