This is the while loop version1 [FIXED] from the book, there is to be a version2 of this one later in the chapter 29 using 'continue' as well. I am tired for code now today, I can see version2 also has the same indentation errors and need the same fix as this version, haven't looked at the rest of it yet.
This one you select a menu option it displays it for 3 seconds, and then it loops back to program to enter another option.I like it I think it could be made in to some nice programs. The delay can be adjusted on Line 5 to more seconds.
Maybe there can be a $DELAY and a new line of $DELAY2 where 2 has a longer duration and then edit the sleep delay on line 28 to $DELAY2 , it might work, to have two different durations allowing for the more text to read on that option, I'll try it tomorrow, as I am tired for code now.
![[Image: while2.png]](https://i.ibb.co/bXCHgwV/while2.png)
There are 2 errors in the while loop code in the book, I fixed these.Both are indentation errors, these are on lines #9 and #17 they should not be indented like they are in the book, just type it like the screenshots then the program runs correctly.
This one you select a menu option it displays it for 3 seconds, and then it loops back to program to enter another option.I like it I think it could be made in to some nice programs. The delay can be adjusted on Line 5 to more seconds.
Maybe there can be a $DELAY and a new line of $DELAY2 where 2 has a longer duration and then edit the sleep delay on line 28 to $DELAY2 , it might work, to have two different durations allowing for the more text to read on that option, I'll try it tomorrow, as I am tired for code now.
![[Image: while1.png]](https://i.ibb.co/fX0D2b5/while1.png)
![[Image: while2.png]](https://i.ibb.co/bXCHgwV/while2.png)
There are 2 errors in the while loop code in the book, I fixed these.Both are indentation errors, these are on lines #9 and #17 they should not be indented like they are in the book, just type it like the screenshots then the program runs correctly.