s = int(input())
print('\n'.join([f"{' ' * (s-x-1)}{'^' * (2 * x + 1)}" for x in range(0, s)]))
s = int(input())
sbg = '^' * ((s-1)*2 + 1)
pr = ''
for k, x in enumerate(range(s)):
pr = f'{" " * k}{sbg}\n{pr}'
sbg = sbg[1:-1]
print(pr)
import sys
from PyQt5.QtWidgets import *
class Example(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Пример")
self.grid_layout = QGridLayout()
self.setLayout(self.grid_layout)
self.textEdit = QTextEdit(self)
self.textEdit.toPlainText()
self.pushButton = QPushButton('ok', self)
self.pushButton.move(50, 50)
self.pushButton.clicked.connect(self.pushButtonClickedHandler)
self.grid_layout.addWidget(self.textEdit, 0, 0)
self.grid_layout.addWidget(self.pushButton)
def pushButtonClickedHandler(self):
text = self.textEdit.toPlainText()
self.grid_layout.addWidget(QLabel(text = text))
if __name__ == '__main__':
app = QApplication(sys.argv)
form = Example()
form.show()
app.exec()