Администраторы группы

  • Аватар

Олимпиада по информатике. Готовимся побеждать!

Открытая группа активность: 4 мес. назад

Группа для тех, кто намеревается побеждать на районных и региональных олимпиадах по информатике.
Здесь можно будет найти олимпиадные задания, задачи повышенной сложности, обсудить оптимальные алгоритмы решений
Памятка для участников олимпиады

Сайт Информатикс – регистрирууемся, решаем, продвигаемся в рейтинге

Программирование на Python. (записей: 106)

← Форум группы   Все форумы
  • Аватар root - 8 мес., 2 нед. назад:

    А patch где? ☺

  • Аватар Alcaine - 8 мес., 2 нед. назад:

    Готовые поля для морского боя.

    import random
    
    board=[]
    
    for i in range (100):
        z=random.randint(0,0)
        board.append(z)
    
    def boardz(board):
        print("____________________________________________")
        for i in range(10):
            print("|", board[0 + i * 3], "|", board[1 + i * 3], "|", board[2 + i * 3], "|", board[3 + i * 3], "|", board[4 + i * 3], "|", board[5 + i * 3], "|", "|", board[6 + i * 3], "|", board[7 + i * 3], "|", board[8 + i * 3], "|", board[9+i*3],"|")
            print("____________________________________________")
    
    board1=[]
    for x in range (100):
        w=random.randint(0,0)
        board.append(w)
    
    def boardz1(board1):
        print("____________________________________________")
        for x in range(10):
            print("|", board1[0 + x * 3], "|", board1[1 + x * 3], "|", board1[2 + x * 3], "|", board1[3 + x * 3], "|",
                  board1[4 + x * 3], "|", board1[5 + x * 3], "|", "|", board1[6 + x * 3], "|", board1[7 + x * 3], "|",
                  board1[8 + x * 3], "|", board1[9 + x * 3], "|")
            print("____________________________________________")
    
    print(boardz(board))
    
  • Аватар Alcaine - 8 мес. назад:

    Нет координат на ось y.

    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for x in board:
            v: int = 0
            if v == 0:
                print(*x)
                v = 0
            else:
                for z in range(1, 11):
                    print(top)
                v = 0
    
    print(boardz(board))
    
  • Аватар Alcaine - 7 мес., 3 нед. назад:
    board = [[0 for i in range (10)] for i in range (10)]
    left = []
    top = []
    
    ships='K'
    
    for q in range (1, 11):
        left.append (q)
    for z in range (1, 11):
        top.append (z)
    
    def boardz(board):
        for z in range (10):
            print (left[z], end=' ')
    
        print ()
    
        for i in range (len (board)):
            print (*board[i],top[i])
    
    print (boardz (board))
    
    def game(board):
        print("Выберите в какую клетку поставить 1-клеточный корабль!")
        playeranswer=int(input("По Х оси"))
        playeranswer1=int(input("По Y оси"))
        if (0<playeranswer<10) and (0<playeranswer1<10):
            T=False
            while not T:
                for i in range(10):
                    if (board[playeranswer1-1][i]==top[playeranswer1-1]) and (board[playeranswer-1][i]==left[playeranswer-1]):
    
  • Аватар Alcaine - 7 мес., 3 нед. назад:
    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    ships = 'K'
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for i in range(len(board)):
            print(*board[i], top[i])
    
    def game(board):
        print(boardz(board))
        print("Добро пожаловать в игру Морской бой!")
        print()
    
        for w in range(4):
            T = False
            while not T:
                print("Выберите в какую клетку поставить 1-клеточный корабль!")
                playeranswer = int(input("По Х оси: "))
                playeranswer1 = int(input("По Y оси: "))
                if (playeranswer1>0 and playeranswer1 < 11) and (playeranswer>0 and playeranswer < 11) :
                    for i in range (1,11):
                        for j in range (1,11):
                            if i==top[playeranswer1-1] and j==left[playeranswer-1]:
                                if board[i-1][j-1] != ships :
                                    board[i-1][j-1]=ships
                                    print(boardz(board))
                                    T=True
                                else:
                                    print("Эта ячейка уже занята")
    
                else:
                    print("Вы ввели некорректный номер ячейки")
    
    print(game(board))
    
  • Аватар Alcaine - 7 мес., 2 нед. назад:
    board = [[0 for i in range (10)] for i in range (10)]
    left = []
    top = []
    
    ships = 'K'
    shot_hit = 'X'
    shot_miss= 'M'
    
    for q in range (1, 11):
        left.append (q)
    for z in range (1, 11):
        top.append (z)
    
    def boardz(board):
        for z in range (10):
            print (left[z], end=' ')
    
        print ()
    
        for i in range (len (board)):
            print (*board[i], top[i])
    
    def ship1(board, ship_hit='X',ship_miss='M'):
        for w in range (4):
            T = False
            while not T:
                print (boardz (board))
                print ("Выберите в какую клетку поставить 1-клеточный корабль!")
                playeranswer = int (input ("По Х оси: "))
                playeranswer1 = int (input ("По Y оси: "))
                if (playeranswer1 > 0 and playeranswer1 < 11) and (playeranswer > 0 and playeranswer < 11):
                    for i in range (1, 11):
                        for j in range (1, 11):
                            if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                                if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (board[i - 1][j - 1] != ship_miss) :
                                    board[i - 1][j - 1] = ships
                                    print (boardz(board))
                                    T = True
                                else:
                                    print ("Эта ячейка уже занята")
    
                else:
                    print ("Вы ввели некорректный номер ячейки")
    
    def ship2 (board, ship_hit='X',ship_miss='M'):
        for w in range (6):
            A=0
            T = False
            while not T:
                print (boardz(board))
                print ("Выберите в какую клетку поставить 2-клеточный корабль!")
                playeranswer = int (input ("По Х оси: "))
                playeranswer1 = int (input ("По Y оси: "))
                if (playeranswer1 > 0 and playeranswer1 < 11) and (playeranswer > 0 and playeranswer < 11):
                    for i in range (1, 11):
                        for j in range (1, 11):
                            if A%2==1:
                                if i == top[playeranswer1-1] and j == left[playeranswer1-1]:
                                    if (board[i - 2][j - 2] != ships) and (board[i - 2][j -2] != ship_hit) and (board[i - 2][j + 1] != ship_miss):
                                        board[i -2][j -2 ] = ships
                                        A=A+1
                                        print (boardz(board))
                                    else:
                                        print("Вы введи некорректный номер ячейки")
    
                            elif A%2==0:
                                    if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                                        if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (board[i - 1][j - 1] != ship_miss) :
                                            board[i - 1][j - 1] = ships
                                            A=A+1
                                            print (boardz(board))
                                        else:
                                            print ("Эта ячейка уже занята")
    
                else:
                    print ("Вы ввели некорректный номер ячейки")
    
  • Аватар Alcaine - 6 мес., 2 нед. назад:

    Задание на урок

    import random
    
    m = [[random.randint(0, 10) for i in range(5)] for i in range(5)]
    
    s1=0
    s2=0
    s3=0
    s4=0
    s5=0
    
    for i in range(len(m)):
            print(*m[i])
    
    for j in range(5):
        s1 = s1 + m[0][j]
        s2 = s2 + m[1][j]
        s3 = s3 + m[2][j]
        s4 = s4 + m[3][j]
        s5 = s5 + m[4][j]
    
    print(max(s1,s2,s3,s4,s5))
    
  • Аватар Alcaine - 6 мес., 2 нед. назад:
    import random
    
    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    ships = 'K'
    shot_hit = 'X'
    shot_miss = 'M'
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for i in range(len(board)):
            print(*board[i], top[i])
    
    def ship1(board, ship_hit='X', ship_miss='M'):
        for w in range(4):
            T = False
            while not T:
                playeranswer = random.randint(1, 10)
                playeranswer1 = random.randint(1, 10)
                for i in range(10):
                    for j in range(10):
                        if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                            if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                    board[i - 1][j - 1] != ship_miss):
                                board[i - 1][j - 1] = ships
                                T = True
        print(boardz(board))
    
    def ship2(board, ship_hit='X', ship_miss='M'):
        for i in range(3):
            M = False
            while not M:
                playeranswer = random.randint(1, 10)
                playeranswer1 = random.randint(1, 10)
                playeranswer2 = random.randint(1, playeranswer)
                playeranswer3 = random.randint(1, playeranswer1)
                for i in range(10):
                    for j in range(10):
                        if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                            if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                    board[i - 1][j - 1] != ship_miss):
                                m=i
                                z=j
    
                                board[i - 1][j - 1] = ships
    
                                if m==top[playeranswer3-1] and z == left[playeranswer2-1]:
                                    if (board[m][z] != ships) and (board[m][z] != ship_hit) and (
                                            board[m][z] != ship_miss):
                                        board[m][z]=ships
                                        M=True
        print(boardz(board))
    
    def shots(board, ship_hit='X', ship_miss='M'):
        print("Выберите, куда вы совершите выстрел")
        shotz1 = int(input("По Х оси: "))
        shotz2 = int(input("По Y оси: "))
        Z = False
        while not Z:
            for i in range(1, 11):
                for j in range(1, 11):
                    if i == top[shotz2 - 1] and j == left[shotz1 - 1]:
                        if board[i - 1][j - 1] != ship_hit and board[i - 1][j - 1] != ship_miss:
                            board[i - 1][j - 1] = ship_hit
                            Z = True
    
    def main(board):
        boardz(board)
        answer = int(input("Какие корабли вы хотите расставить? "))
        if answer == 1:
            ship1(board)
        elif answer==2:
            ship2(board)
        print("Готовиться к Стрельбе!")
        for i in range(4):
            shots(board)
            boardz(board)
    
    main(board)
    
  • Аватар Alcaine - 6 мес., 2 нед. назад:
    import random
    
    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    ships = 'K'
    shot_hit = 'X'
    shot_miss = 'M'
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for i in range(len(board)):
            print(*board[i], top[i])
    
    def ship1(board, ship_hit='X', ship_miss='M'):
        for w in range(4):
            T = False
            while not T:
                playeranswer = random.randint(1, 10)
                playeranswer1 = random.randint(1, 10)
                for i in range(10):
                    for j in range(10):
                        if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                            if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                    board[i - 1][j - 1] != ship_miss):
                                board[i - 1][j - 1] = ships
                                T = True
        print(boardz(board))
    
    def ship2(board, ship_hit='X', ship_miss='M',ships='K'):
        T=0
        while T>3:
            playeranswer=random.randint(1,10)
            playeranswer1=random.randint(1,10)
            playeranswer2=random.randint(1,10)
            playeranswer3=random.randint(1,10)
            for i in range(10):
                for j in range(10):
                    if i==top[playeranswer1-1] and j==left[playeranswer-1]:
                        if (board[i-1][j-1]!=ships) and (board[i-1][j-1]!=ship_hit) and (board[i-1][j-1]!=ship_miss):
                            board[i-1][j-1]=ships
                            z=i
                            w=j
            for m in range(10):
                for a in range(10):
                    if m==top[playeranswer3-1] and a==left[playeranswer2-1]:
                            if m==z and a==w:
                                choice1=board[m][a]
                                choice2=board[m+1][a+1]
                                result=random.choice(choice1,choice2)
                                ships=result
                                T=T+1
        print(boardz(board))
    
    def shots(board, ship_hit='X', ship_miss='M'):
        print("Выберите, куда вы совершите выстрел")
        shotz1 = int(input("По Х оси: "))
        shotz2 = int(input("По Y оси: "))
        Z = False
        while not Z:
            for i in range(1, 11):
                for j in range(1, 11):
                    if i == top[shotz2 - 1] and j == left[shotz1 - 1]:
                        if board[i - 1][j - 1] != ship_hit and board[i - 1][j - 1] != ship_miss:
                            board[i - 1][j - 1] = ship_hit
                            Z = True
    
    def main(board):
        boardz(board)
        answer = int(input("Какие корабли вы хотите расставить? "))
        if answer == 1:
            ship1(board)
        elif answer==2:
            ship2(board)
        print("Готовиться к Стрельбе!")
        for i in range(4):
            shots(board)
            boardz(board)
    
    main(board)
    
  • Аватар Alcaine - 5 мес., 3 нед. назад:
    import random
    
    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    ships = 'K'
    shot_hit = 'X'
    shot_miss = 'M'
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for i in range(len(board)):
            print(*board[i], top[i])
    
    def ship1(board, ship_hit='X', ship_miss='M'):
        for w in range(4):
            T = False
            while not T:
                playeranswer = random.randint(1, 10)
                playeranswer1 = random.randint(1, 10)
                for i in range(10):
                    for j in range(10):
                        if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                            if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                    board[i - 1][j - 1] != ship_miss):
                                board[i - 1][j - 1] = ships
                                T = True
        print(boardz(board))
    
    def ship2(board, ship_hit='X', ship_miss='M', ships='K'):
        T = 0
        while T < 3:
            playeranswer = random.randint(1, 10)
            playeranswer1 = random.randint(1, 10)
            n=random.randint(1,4)
            for i in range(10):
                for j in range(10):
                    if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                        if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                board[i - 1][j - 1] != ship_miss):
                            board[i - 1][j - 1] = ships
            for i in range(10):
                for j in range(10):
                    if i==top[playeranswer1-1] and j==left[playeranswer-1]:
                            if (n==1) and (board[playeranswer1][playeranswer-1]!=ships) and (board[playeranswer1][playeranswer-1]!=ship_hit) and (board[playeranswer1][playeranswer-1]!=ship_miss):
                                board[playeranswer1][playeranswer-1]=ships
                                T=T+1
    
                            elif (n==2) and (board[playeranswer1-1][playeranswer]!=ships) and (board[playeranswer1-1][playeranswer]!=ship_hit) and (board[playeranswer1-1][playeranswer]!=ship_miss):
                                board[playeranswer1-1][playeranswer]=ships
                                T=T+1
    
                            elif (n==3) and (board[playeranswer1][playeranswer+1]!=ships) and (board[playeranswer1][playeranswer+1]!=ship_hit) and (board[playeranswer1][playeranswer1+1]!=ship_miss):
                                board[playeranswer1][playeranswer+1]=ships
                                T=T+1
    
                            elif (n==4) and (board[playeranswer1+1][playeranswer]!=ships) and (board[playeranswer1+1][playeranswer]!=ship_hit) and (board[playeranswer1+1][playeranswer1]!=ship_miss):
                                board[playeranswer1+1][playeranswer]=ships
                                T=T+1
        print(boardz(board))
    
    def shots(board, ship_hit='X', ship_miss='M'):
        print("Выберите, куда вы совершите выстрел")
        shotz1 = int(input("По Х оси: "))
        shotz2 = int(input("По Y оси: "))
        Z = False
        while not Z:
            for i in range(1, 11):
                for j in range(1, 11):
                    if i == top[shotz2 - 1] and j == left[shotz1 - 1]:
                        if board[i - 1][j - 1] != ship_hit and board[i - 1][j - 1] != ship_miss:
                            board[i - 1][j - 1] = ship_hit
                            Z = True
    
    def main(board):
        boardz(board)
        answer = int(input("Какие корабли вы хотите расставить? "))
        if answer == 1:
            ship1(board)
        elif answer == 2:
            ship2(board)
        print("Готовиться к Стрельбе!")
        for i in range(4):
            shots(board)
            boardz(board)
    
    main(board)
    
  • Аватар prepod - 5 мес., 1 нед. назад:

    Насчет работы с текстовыми файлами в Python

  • Аватар root - 5 мес., 1 нед. назад:

    Какая прелесть, какая ня…
    Вопрос всем и в первую очередь преподу: что произойдёт, если описанную в статье парадигму применить к предоставленному _мной_ ТЕКСТОВОМУ файлу? ☺

  • Аватар prepod - 5 мес., 1 нед. назад:

    Так расскажите) Отдельной темой и поподробнее

  • Аватар Alcaine - 5 мес. назад:
    import random
    
    board = [[0 for i in range(10)] for i in range(10)]
    left = []
    top = []
    
    ships = 'K'
    shot_hit = 'X'
    shot_miss = 'M'
    
    for q in range(1, 11):
        left.append(q)
    for z in range(1, 11):
        top.append(z)
    
    def boardz(board):
        for z in range(10):
            print(left[z], end=' ')
    
        print()
    
        for i in range(len(board)):
            print(*board[i], top[i])
    
    def ship1(board, ship_hit='X', ship_miss='M'):
        for w in range(4):
            T = False
            while not T:
                playeranswer = random.randint(1, 10)
                playeranswer1 = random.randint(1, 10)
                for i in range(10):
                    for j in range(10):
                        if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                            if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                    board[i - 1][j - 1] != ship_miss):
                                board[i - 1][j - 1] = ships
                                T = True
        print(boardz(board))
    
    def ship2(board, ship_hit='X', ship_miss='M', ships='K'):
        T = 0
        while T < 3:
            playeranswer = random.randint(1, 10)
            playeranswer1 = random.randint(1, 10)
            n=random.randint(1,2)
            for i in range(10):
                for j in range(10):
                    if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                        if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                board[i - 1][j - 1] != ship_miss):
                            if (board[i][j]!=ships) and (board[i][j-1]!=ships) and (board[i-1][j]!=ships):
                                board[i - 1][j - 1] = ships
            for i in range(10):
                for j in range(10):
                    if i==top[playeranswer1-1] and j==left[playeranswer-1]:
                            if (n==1) and (board[playeranswer1][playeranswer-1]!=ships) and (board[playeranswer1][playeranswer-1]!=ship_hit) and (board[playeranswer1][playeranswer-1]!=ship_miss):
                                if (board[playeranswer1][playeranswer]!=ships) and (board[playeranswer1-2][playeranswer-2]!=ships) and (board[playeranswer1-2][playeranswer-1]!=ships) and (board[playeranswer1-1][playeranswer-2]!=ships):
    
                                    board[playeranswer1][playeranswer-1]=ships
                                    T=T+1
    
                            elif (n==2) and (board[playeranswer1-1][playeranswer]!=ships) and (board[playeranswer1-1][playeranswer]!=ship_hit) and (board[playeranswer1-1][playeranswer]!=ship_miss):
                                if (board[playeranswer1][playeranswer] != ships) and (
                                        board[playeranswer1 - 2][playeranswer - 2] != ships) and (
                                        board[playeranswer1 - 2][playeranswer - 1] != ships) and (
                                        board[playeranswer1 - 1][playeranswer - 2] != ships):
                                    board[playeranswer1-1][playeranswer]=ships
                                    T=T+1
        print(boardz(board))
    
    def ship3(board,  ship_hit='X', ship_miss='M', ships='K'):
        T = False
        while not T:
            playeranswer = random.randint(1, 10)
            playeranswer1 = random.randint(1, 10)
            n = random.randint(1, 2)
            for i in range(10):
                for j in range(10):
                    if i == top[playeranswer1 - 1] and j == left[playeranswer - 1]:
                        if (board[i - 1][j - 1] != ships) and (board[i - 1][j - 1] != ship_hit) and (
                                board[i - 1][j - 1] != ship_miss):
                            if (board[i][j]!=ships) and (board[i][j-1]!=ships) and (board[i-1][j]!=ships):
                                board[i - 1][j - 1] = ships
            for i in range(10):
                for j in range(10):
                    if i==top[playeranswer1-1] and j==left[playeranswer-1]:
                            if (n==1) and (board[playeranswer1][playeranswer-1]!=ships) and (board[playeranswer1][playeranswer-1]!=ship_hit) and (board[playeranswer1][playeranswer-1]!=ship_miss):
                                if (board[playeranswer1][playeranswer]!=ships) and (board[playeranswer1-2][playeranswer-2]!=ships) and (board[playeranswer1-2][playeranswer-1]!=ships) and (board[playeranswer1-1][playeranswer-2]!=ships):
    
                                    board[playeranswer1][playeranswer-1]=ships and board[playeranswer1][playeranswer]
                                T=True
    
                            elif(n==2) and (board[playeranswer1-1][playeranswer]!=ships) and (board[playeranswer1-1][playeranswer]!=ship_hit) and (board[playeranswer1-1][playeranswer]!=ship_miss):
                                if (board[playeranswer1][playeranswer] != ships) and (
                                        board[playeranswer1 - 2][playeranswer - 2] != ships) and (
                                        board[playeranswer1 - 2][playeranswer - 1] != ships) and (
                                        board[playeranswer1 - 1][playeranswer - 2] != ships):
                                    board[playeranswer1 - 1][playeranswer] = ships and board[playeranswer1][playeranswer]
                                T=True
        print(boardz(board))
    
    def shots(board, ship_hit='X', ship_miss='M'):
        print("Выберите, куда вы совершите выстрел")
        shotz1 = int(input("По Х оси: "))
        shotz2 = int(input("По Y оси: "))
        Z = False
        while not Z:
            for i in range(1, 11):
                for j in range(1, 11):
                    if i == top[shotz2 - 1] and j == left[shotz1 - 1]:
                        if board[i - 1][j - 1] != ship_hit and board[i - 1][j - 1] != ship_miss:
                            board[i - 1][j - 1] = ship_hit
                            Z = True
    
    def main(board):
        boardz(board)
        answer = int(input("Какие корабли вы хотите расставить? "))
        if answer == 1:
            ship1(board)
        if answer == 2:
            ship2(board)
        elif answer==3:
            ship3(board)
        print("Готовиться к Стрельбе!")
        for i in range(4):
            shots(board)
            boardz(board)
    
    main(board)
    
  • Аватар Alcaine - 4 мес., 4 нед. назад:
    import time
    class hero:
        def __init__(self,power=1,agility=1,intellect=1,health=10,race="Эльф",resistance=10,cunning=10,typez="Лучник",name="Алькаин"):
            self.power=power
            self.agility=agility
            self.intellect=intellect
            self.health=health
            self.race=race
            self.resistance=resistance
            self.cunning=cunning
            self.typez=typez
            self.name=name
    
    trys=hero()
    
    def create():
        T=10
        while T>0:
            print("Имя: ",trys.name)
            print("Раса: ", trys.race)
            print("Класс: ", trys.typez)
            print("Текущая сила: ",trys.power)
            print("Текущая ловкость: ",trys.agility)
            print("Текущий интеллект: ", trys.intellect)
            print("Текущее здоровье: ",trys.health)
            print("Текущая хитрость: ",trys.cunning)
            print("Текущее сопротивление: ",trys.resistance)
            print("Очки талантов: ", T)
            n=int(input("Какие навыки хотите изменить? 1-сила, 2-ловкость, 3-интеллект: "))
            if n==1:
                trys.power+=1
                trys.health+=5
                T-=1
            if n==2:
                trys.agility+=1
                trys.cunning+=5
                T-=1
            elif n==3:
                trys.intellect+=1
                trys.resistance+=5
                T-=1
    
    def lvl1():
        print("Томное небо на фоне людской вражды и крови выглядело так невинно, словно осенний лепесток перед наступлением вечномерзлой юдоли, зимы. Глядя на него, забывались прочие обиды и людские пороки. Ничто не могло с ним сравниться. Сейчас")
        print("")
        time.sleep(8)