import pygame

(width, height) = (400, 400)
screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
pygame.display.set_caption('Grapher')
mainclock = pygame.time.Clock()

def calculate_y(x):
    # y = 0.002*x**2
    y = 30*(1.03**x) + 1
    return y

def graph():
    prev_point = (0,0)
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255,255,255), prev_point, (x,height-y))
        prev_point = (x,height-y)
        # pygame.draw.circle(screen, (200, 200, 200), (x,y), 1)
    pygame.display.flip()

graph()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                graph()
        if event.type == pygame.VIDEORESIZE:
            surface = pygame.display.set_mode((event.w, event.h), pygame.RESIZABLE)
            width = event.w
            height = event.h
0198f07bb49b58e23a5fc92e98bbd40ad760b1f8
<mask token>


def calculate_y(x):
    y = 30 * 1.03 ** x + 1
    return y


def graph():
    prev_point = 0, 0
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255, 255, 255), prev_point, (x, height - y))
        prev_point = x, height - y
    pygame.display.flip()


<mask token>

<mask token>
pygame.display.set_caption('Grapher')
<mask token>


def calculate_y(x):
    y = 30 * 1.03 ** x + 1
    return y


def graph():
    prev_point = 0, 0
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255, 255, 255), prev_point, (x, height - y))
        prev_point = x, height - y
    pygame.display.flip()


graph()
<mask token>
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                graph()
        if event.type == pygame.VIDEORESIZE:
            surface = pygame.display.set_mode((event.w, event.h), pygame.
                RESIZABLE)
            width = event.w
            height = event.h

<mask token>
width, height = 400, 400
screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
pygame.display.set_caption('Grapher')
mainclock = pygame.time.Clock()


def calculate_y(x):
    y = 30 * 1.03 ** x + 1
    return y


def graph():
    prev_point = 0, 0
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255, 255, 255), prev_point, (x, height - y))
        prev_point = x, height - y
    pygame.display.flip()


graph()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                graph()
        if event.type == pygame.VIDEORESIZE:
            surface = pygame.display.set_mode((event.w, event.h), pygame.
                RESIZABLE)
            width = event.w
            height = event.h

import pygame
width, height = 400, 400
screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
pygame.display.set_caption('Grapher')
mainclock = pygame.time.Clock()


def calculate_y(x):
    y = 30 * 1.03 ** x + 1
    return y


def graph():
    prev_point = 0, 0
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255, 255, 255), prev_point, (x, height - y))
        prev_point = x, height - y
    pygame.display.flip()


graph()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                graph()
        if event.type == pygame.VIDEORESIZE:
            surface = pygame.display.set_mode((event.w, event.h), pygame.
                RESIZABLE)
            width = event.w
            height = event.h

import pygame

(width, height) = (400, 400)
screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
pygame.display.set_caption('Grapher')
mainclock = pygame.time.Clock()

def calculate_y(x):
    # y = 0.002*x**2
    y = 30*(1.03**x) + 1
    return y

def graph():
    prev_point = (0,0)
    for x in range(width):
        y = calculate_y(x)
        if y > height or y < 0:
            break
        pygame.draw.line(screen, (255,255,255), prev_point, (x,height-y))
        prev_point = (x,height-y)
        # pygame.draw.circle(screen, (200, 200, 200), (x,y), 1)
    pygame.display.flip()

graph()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
        if event.type == pygame.KEYDOWN:
            if event.key == pygame.K_r:
                graph()
        if event.type == pygame.VIDEORESIZE:
            surface = pygame.display.set_mode((event.w, event.h), pygame.RESIZABLE)
            width = event.w
            height = event.h