Ask coding questions

← Back to all posts
Connect 4 ignoring first row
reddevils1979 (0)

Everything seems to be working perfectly EXCEPT when I move should be placed in the first row it is looked at as an invalid move. It doesn't break the program, just keeps on asking the player for a different move. I have no idea why this is happening, so if anybody can lend a hand it would be appreciated.

MatthewADev (18)

or you can call every column

MatthewADev (18)

Hi, I recommend to make DEF for each one of them and assign them.
hi = input("Players Movement: ")
def s1():
print("You picked RIGHT!")
def s2():
print("You picked LEFT!")
if hi == "right":
elif hi == "left":