How do i do that?

I have to create all the method signatures in the ResizableArrayList and then fill it in with comments. And each method is supposed to be blank with a return null or --1. How do i do this?

Oh crap thanks!!

I have to create all the method signatures in the ResizableArrayList and then fill it in with comments. And each method is supposed to be blank with a return null or --1. How do i do this?

Hi its no longer an issue thanks anyway

I'm a Python semi-beginner and i have to do a prac but the problem is i've totally forgetten how to do it! Can you please help me get started with part 1 even if its just 1.a because every time i tried to get it to work it keeps saying 'unexpected indention'. Any help would be great, thanks.

1.a) Create a list that contains the names of 5 students of this class (you may need to ask other students their name). Do not ask for user input through the keyboard, simply create the list with 5 names hard coded into your program.

b) Print the list to the screen.

c) Ask the user to input one more name and append it to the end of the list.

d) Print the list to the screen.

I'm not really sure what you mean? adapt the maze to move?

I'm stuck on the fifth stage of my assignment, the question is;

'Add in code to the key-press event handler so that the 'person' is constrained to move within the array and cant' walk through a wall.'

I'm not sure how i'm supposed to update the curindex, i really need some ideas so any help would be appreacited heaps!

The following is the code;

import maze
import graphics

h = 20
w = 20
cellsize = 20
startpos = maze.Index(1,1)
curindex = startpos # stage 5
endpos = maze.Index(h, w)
win = graphics.GraphWin("my Maze", wcellsize, hcellsize)
mymaze = maze.Maze(win, h, w, cellsize,startpos ,endpos )

person = graphics.Circle(graphics.Point(cellsize/2+2, cellsize/2+2), cellsize/2)
person.setFill(mymaze.COLOURS['person'])
person.draw(win)

def handleKeys(event):
global curindex
print('Key pressed: ', event.keysym, event.keycode)
if event.keysym == 'Right':
person.move(cellsize, 0) # stage 5
mymaze.RIGHT = Index(0,1)
curindex = Index(3,4), Index(3,5)

            # update curindex
            # can do this by adding mymaze.RIGHT to curindex
    elif event.keysym == 'Left':
            person.move(-cellsize, 0) 
    elif event.keysym == 'Up':
            person.move(0, -cellsize) 
    elif event.keysym == 'Down':
            person.move(0, cellsize) 

win.bind_all('<Key>', handleKeys)
win.mainloop()

win.mainloop()