def click(): entered_text = textentry.get() #print(entered_text) textentry.delete(0, END) ans, multiple_file, parsed_sent = get_input(entered_text) from crawlsubprocess import crawlsub if crawlsub(parsed_sent) != 'File Present': #print("Please wait some time Crawling") ans = "Please wait some time" time.sleep(15) output = Label(window, text=ans, bg="black", fg="white", font="none 12 bold") output.grid(row=5, column=0, columnspan=2, sticky=W)
else: columns.append(' ') print(row + 1, '|', ' | '.join(columns), '|') print(' ', '-' * 33) if __name__ == "__main__": ''' ========== EXAMPLES BELLOW ========== ''' from main import new_game, losses, get_input, uncover, wins game_map = new_game() while True: print_map(game_map) if wins(game_map): print('Congratulations! You win!') print('Thank you for playing Minesweeper!') break elif losses(game_map): print('Oh no! You lose!') print('Thank you for playing Minesweeper!') break values = get_input(game_map) game_map = uncover(game_map, values[0], values[1])
import numpy as np from main import get_input ''' 3 4 2 3 2 10 0 0 1 3 2 9 1 2 1 0 0 9 2 0 2 2 0 9 ''' R, C, F, N, B, T, out_arr = get_input('d_metropolis.in') #R # ROWS #C # COLUMNS #F # VEHICLES #N # RIDES #B # BONUS #T # STEPS v_array = np.zeros((F,2), dtype='uint8') map_array = np.ones((R, C), dtype='bool') for i in range(0, T): for v_ in v_array: for coordinate in v_: def calculate_distance(x1,y1, x2, y2): xr = x1 - x2 yr = y1 - y2 return abs(xr)+abs(yr) for i, j in enumerate(routes):