# Allison Obourn
# CS 115, Autumn 2021
# Lecture 21

# This program prints out the series of numbers 2, 7, 12, 17, 22
# with each number on its own line, a blank line, the numbers 1-5 on their
# own lines, draws a set of stairs increasing in height to the right. Then
# it outputs the first list of numbers again

from ECGUI import *

def main():
    print_numbers()
    print()
    print_1_to_5()
    draw_stairs()
    print()
    print_numbers()

# prints the numbers seperated by 5 starting at 2 and finishing at 22. Each
# number is printed on its own line. NUmbers are printed smallest to largest
def print_numbers():
    for count in range(1, 6):
        print(5 * count - 3)

# prints all the whole numbers 1 to 5 inclusive each on their own line in
# increasing order
def print_1_to_5():
    count = 1
    while count < 6:
        print(count)
        count = count + 1

# opens a window and draws a staircase on it that goes up to the right. The
# stairs are outlined in black on a white background. There are 10 in total. 
def draw_stairs():
    panel = drawing_panel(300, 300)
    for i in range(0, 10):
        panel.draw_rect(-10 * i + 90, 20 + 10 * i,10 * i + 10, 10)
main()
