paste the code in the notes and credits into https://www.programiz.com/python-programming/online-compiler/ and press run. press run to reset. input w a s d by typing one of them and pressing enter. (it moves around a 0 in a # board)) ------------- this was mostly to practice if statements
#☐ x = 0 y = 0 ended = False while ended == False: inp = input("INPUT: ") if inp == "w" and y > 0: y -= 1 elif inp == "s" and y < 4: y += 1 elif inp == "a" and x > 0: x -= 1 elif inp == "d" and x < 4: x += 1 if y == 0: if x == 0: print("0####") elif x == 1: print("#0###") elif x == 2: print("##0##") elif x == 3: print("###0#") elif x == 4: print("###") else: print("#####") else: print("#####") if y == 1: if x == 0: print("0####") elif x == 1: print("") else: print("#####") else: print("#####") if y == 2: if x == 0: print("0####") elif x == 1: print("") else: print("#####") else: print("#####") if y == 3: if x == 0: print("0####") elif x == 1: print("") else: print("#####") else: print("#####") if y == 4: if x == 0: print("0####") elif x == 1: print("") else: print("#####") else: print("#####")