<prompt> Unda hati ya Python ambayo hutoa mazes nasibu kwa kutumia algorithm ya Prim na kuzionyesha kama sanaa ya ASCII. Mtumiaji anapaswa kuwa na uwezo wa kubainisha vipimo vya maze. PLINFORMAT  <response>: kuagiza bila mpangiliokutoka kwa makusanyo kuagiza dequedef create_mazeupana, urefu: maze upana 2 1 kwa _ katika masafaurefu 2 1 def add_wallx, y: ikiwa 0 x upana 2 na 0 y urefu 2: kuta.ambatishax,y def kuchonga x, y: mazeyx start_x, start_y random.randint0, upana - 1 2 1, random.randint0, urefu - 1 2 1 chongaanza_x, anza_y kuta deque ongeza_ukutaanza_x - 1, anza_y ongeza_ukutaanza_x 1, anza_y ongeza_ukutaanza_x, anza_y - 1 ongeza_ukutaanza_x, anza_y 1 wakati kuta: ukuta_x, ukuta_y kuta.popleft ikiwa mazewall_ywall_x : majirani ikiwa wall_x 1 na mazewall_ywall_x - 2 : majirani.ongeza ukuta_x - 1, ukuta_y ikiwa wall_x width 2 - 1 na mazewall_ywall_x 2 : jirani.ongeza ukuta_x 1, ukuta_y ikiwa wall_y 1 na mazewall_y - 2wall_x : majirani.ongeza ukuta_x, ukuta_y - 1 ikiwa wall_y urefu 2 - 1 na mazewall_y 2wall_x : majirani.ongeza ukuta_x, ukuta_y 1 ikiwa majirani: kuchonga ukuta_x, ukuta_y next_x, next_y random.chaguomajirani add_wall next_x - 1, next_y add_wallifuatayo_x 1, inayofuata_y add_wall next_x, next_y - 1 add_wall next_x, next_y 1 kurudi mazedef print_mazemaze: kwa safu kwenye maze: chapa.jiungesafukama __name__ __main__: width, height intinputIngiza upana wa maze: , intinputIngiza urefu wa maze: maze create_mazeupana, urefu print_mazemaze 