On Saturday, October 8, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote: > This is the result when I copy and paste it one line at a time : > > >>> rect_x = 50 > >>> rect_y = 50 > >>> while not done: > >>> > for event in ... <etc>
There's sure something strange about your formatting you want something like this I think: rect_x = 50 rect_y = 50 while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True On a related note in addition to Steven's 2 suggestions - paste 1 line at a time - Write the code in a py file you could also try it out without Idle ie start python at your shell (or terminal or cmd.exe or whatever) And try it there -- https://mail.python.org/mailman/listinfo/python-list