Snake

Use the curses library to draw a sequence of stars in snake-like order. After the program starts, it will ask the user about the width and height, then invoke the curses.initscr() function to start drawing.

The following is an example for Width=40 and Height=6.
Snake

You may invoke curses.curs_set(0) to hide the cursor while the program is running. This will make the display more elegant. Be sure to invoke curses.curs_set(2) to bring it back.