def __init__(self): super() self.num = number.License() self.multi = multi.multi() #car 부분에서쓰는 임시적으로 위치 저장 변수 self._bup = -1 #엘리베이터 층수를 임시적으로 저장 변수 self._elevator = -1 #주차후 엘리베이터를 움직이기 위한 if용도 변수 self._onoffelevator = False #up 1, down 2, stop 3 self._updown = -1 #엘리베이터가 내려오고 주차장 주차장 dic 변수값이 바뀔때 사용하는 변수 self._appelv = 0
clock.tick(FPS) for event in pygame.event.get(): if event.type == pygame.QUIT: rep_loop = False if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: rep_loop = False if event.key == pygame.K_r: rep_loop = False repeat = True screen.fill((255, 255, 255)) screen.blit(text, (x, y)) screen.blit(text_r, (x1, y1)) pygame.display.flip() ########################################## Game launch ########################################## while repeat: repeat = False gamemode = '' game_over = False menu() if gamemode == 's': game_over, winner, lost, kicked = single() elif gamemode == 'm': game_over, winner, lost, kicked = multi() elif gamemode == 'a': game_over, winner, lost, kicked = autoplay() if game_over: again(winner, lost, kicked) pygame.quit()
print("enter no of rows and columns of 1st matrix") r1 = int(input()) c1 = int(input()) print("enter the array:") a = [[int(input()) for j in range(c1)] for i in range(r1)] print("printing the array:") for row in a: print(' '.join(str(elem) for elem in row)) sA = createSparse.create(a) print("enter no of rows and columns of 2st matrix") r2 = int(input()) c2 = int(input()) print("enter the array:") b = [[int(input()) for j in range(c2)] for i in range(r2)] print("printing the array:") for row in b: print(' '.join(str(elem) for elem in row)) sB = createSparse.create(b) mul = multi.multi(sA, sB)
l = int(input('pon un numero')) list.append(l) z = 1 while z != 0: print('*****************************') print('*1. el numero más pequeño *') print('*2. el numero más grande *') print('*3. el 2º numero más pequeño*') print('*4. el 2º numero más grande *') print('*5. sacar media de la lista *') print('*6. sumar la lista *') print('*7. multiplicar la lista *') print('*0. salir del programa *') print('*****************************') z = int(input('elige una opcion: ')) if (z == 1): pq(list) if (z == 2): MG(list) if (z == 3): segundoPequeño(list) if (z == 4): M2G(list) if (z == 5): med(list) if (z == 6): suma(list) if (z == 7): multi(list)
import multi multi.multi(10)