contador = 10
for i in range(9):
    for j in range(i+1):
        print(f'{contador} ',end='')
        contador += 1
    print()
print()

lado = int(input("Entre com o número de o's: "))
for i in range(lado):
    if i == 0 or i == lado-1:
        for l in range(lado-1):
            print('o ',end='')
        print('o')
    else:
        for l in range(lado):
            if l == 0 or l == lado-1:
                print('o ',end='')
            else:
                print('  ',end='')
        print()
print()

numero = int(input("Digite um número inteiro: "))
ponteiro = 1
for j in range(numero,0,-1):
    for i in range(j):
        print(f'{ponteiro} ',end='')
        ponteiro += 2
    for i in range((numero-j)*2):
        print('  ',end='')
    for i in range(j):
        ponteiro += -2
        print(f'{ponteiro} ',end='')
    print()
    ponteiro += 2
for j in range(1,numero+1,1):
    ponteiro -= 2
    for i in range(j):
        print(f'{ponteiro} ',end='')
        ponteiro += 2
    for i in range((numero-j)*2):
        print('  ',end='')
    for i in range(j):
        ponteiro += -2
        print(f'{ponteiro} ',end='')
    print()

import pygame

# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)

pygame.init()

# Set the width and height of the screen [width, height]
size = (700, 500)
screen = pygame.display.set_mode(size)

pygame.display.set_caption("My Game")

# Loop until the user clicks the close button.
done = False

# Used to manage how fast the screen updates
clock = pygame.time.Clock()

# -------- Main Program Loop -----------
while not done:
    # --- Main event loop
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True

    # --- Game logic should go here

    # --- Screen-clearing code goes here

    # Here, we clear the screen to white. Don't put other drawing commands
    # above this, or they will be erased with this command.

    # If you want a background image, replace this clear with blit'ing the
    # background image.
    screen.fill(GREEN)

    # --- Drawing code should go here
    pygame.draw.rect(screen, RED, [55, 50, 20, 25], 0)
    pygame.draw.rect(screen, RED, [55, 100, 20, 25])
    pygame.draw.rect(screen, RED, [55, 150, 40, 25])
    pygame.draw.rect(screen, RED, [55, 200, 40, 60], 3)
    # --- Go ahead and update the screen with what we've drawn.
    pygame.display.flip()

    # --- Limit to 60 frames per second
    clock.tick(60)

# Close the window and quit.
pygame.quit()


contador = 10
for i in range(9):
    for j in range(i+1):
        print(f'{contador} ',end='')
        contador += 1
    print()
print()

lado = int(input("Entre com o número de o's: "))
for i in range(lado):
    if i == 0 or i == lado-1:
        for l in range(lado-1):
            print('o ',end='')
        print('o')
    else:
        for l in range(lado):
            if l == 0 or l == lado-1:
                print('o ',end='')
            else:
                print('  ',end='')
        print()
print()

numero = int(input("Digite um número inteiro: "))
ponteiro = 1
for j in range(numero,0,-1):
    for i in range(j):
        print(f'{ponteiro} ',end='')
        ponteiro += 2
    for i in range((numero-j)*2):
        print('  ',end='')
    for i in range(j):
        ponteiro += -2
        print(f'{ponteiro} ',end='')
    print()
    ponteiro += 2
for j in range(1,numero+1,1):
    ponteiro -= 2
    for i in range(j):
        print(f'{ponteiro} ',end='')
        ponteiro += 2
    for i in range((numero-j)*2):
        print('  ',end='')
    for i in range(j):
        ponteiro += -2
        print(f'{ponteiro} ',end='')
    print()

import pygame

# Define some colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GREEN = (0, 255, 0)
RED = (255, 0, 0)

pygame.init()

# Set the width and height of the screen [width, height]
size = (700, 500)
screen = pygame.display.set_mode(size)

pygame.display.set_caption("My Game")

# Loop until the user clicks the close button.
done = False

# Used to manage how fast the screen updates
clock = pygame.time.Clock()

# -------- Main Program Loop -----------
while not done:
    # --- Main event loop
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            done = True

    # --- Game logic should go here

    # --- Screen-clearing code goes here

    # Here, we clear the screen to white. Don't put other drawing commands
    # above this, or they will be erased with this command.

    # If you want a background image, replace this clear with blit'ing the
    # background image.
    screen.fill(GREEN)

    # --- Drawing code should go here
    pygame.draw.rect(screen, RED, [55, 50, 20, 25], 0)
    pygame.draw.rect(screen, RED, [55, 100, 20, 25])
    pygame.draw.rect(screen, RED, [55, 150, 40, 25])
    pygame.draw.rect(screen, RED, [55, 200, 40, 60], 3)
    # --- Go ahead and update the screen with what we've drawn.
    pygame.display.flip()

    # --- Limit to 60 frames per second
    clock.tick(60)

# Close the window and quit.
pygame.quit()


# Define some colors # Set the width and height of the screen [width, height] # Loop until the user clicks the close button. # Used to manage how fast the screen updates # -------- Main Program Loop ----------- # --- Main event loop # --- Game logic should go here # --- Screen-clearing code goes here # Here, we clear the screen to white. Don't put other drawing commands # above this, or they will be erased with this command. # If you want a background image, replace this clear with blit'ing the # background image. # --- Drawing code should go here # --- Go ahead and update the screen with what we've drawn. # --- Limit to 60 frames per second # Close the window and quit.