How to create structure with while loop?
3 views (last 30 days)
I don't understand what my instructor means by this, can someone explain for me? Thanks!
Create a script containing a while loop that checks for a yes response to continue (we did this in class – you must set an initial “answer” to ‘y’ at the beginning of the loop, then take a character input at the end of everything to check for exiting. Use strcmpi to compare the “answer” to ‘y’).
Muthu Annamalai on 29 Oct 2015
Hello Vy, You are looking for a event loop like this,
answer = 'y'
answer = input('Do you want to continue (y/n) ? ','s')
I also recommend you look at the