elif cell =set([' '' ']) canvasstr +down_right_char elif cell =set([' '' ']) canvasstr +down_left_char elif cell =set([' '' ']) canvasstr +up_right_char elif cell =set([' '' ']) canvasstr +up_left_char elif cell =set([' '' '' ']) canvasstr +up_down_right_char elif cell =set([' '' '' ']) canvasstr +up_down_left_char elif cell =set([' '' '' ']) canvasstr +down_left_right_char elif cell =set([' '' '' ']) canvasstr +up_left_right_char elif cell =set([' '' '' '' ']) canvasstr +cross_char elif cell =none canvasstr + canvasstr +'\nadd newline at the end of each row return canvasstr moves [ while truemain program loop draw the lines based on the data in canvas print(getcanvasstring(canvascursorxcursory) print('wasd keys to moveh for helpc to clear ' to saveor quit ' response input(''upper( if response ='quit' print('thanks for playing!' sys exit(quit the program elif response =' ' print('enter wasand characters to move the cursor and' print('draw line behind it as it moves for exampleddd' print('draws line going right and sssdddwwwaaa draws box ' print( print('you can save your drawing to text file by entering ' input('press enter to return to the program ' continue elif response =' ' canvas {erase the canvas data moves append(' 'record this move elif response =' ' save the canvas string to text file try print('enter filename to save to:' filename input('' make sure the filename ends with txt if not filename endswith(txt')etching drawer