DEV Community

loading...

Discussion on: Project in Python

Collapse
eddiecoyote profile image
Eddie Author

WOO HOO! I figured it out.

I tried creating a global variable before the functions, thinking that the functions would add to the global variable by 1. Didn't work. I added the global variable in each function, but because I had declared a global variable block = int(1) at the very beginning, it was messing it up. So I took that code out and it worked like a charm. It kept repeating my basic_move() until 4 times, and then told me that I won. HUZZAH!

a picture of my repl