#2-1###################################################
"""Write a program that prints your name 100 times."""

##for i in range(100):
## print("your name")
 

#2-2####################################################
"""Write a program to fill the screen horizontally and
vertically with your name. [Hint: add the option end=''
into the print function to fill the screen horizontally.]"""

##for i in range(10):
##    print("your name " * 6)

#2-3######################################################
"""Write a program that outputs 100 lines, numbered 1 to
100, each with your name on it. The output should look like
the output below."""

##for i in range(1,101):
##    print(i ,"your name")

#2-4######################################################
"""Write a program that prints out a list of the integers
from 1 to 20 and their squares. The output should look like
this:"""

##for i in range(1,21):
##    print(i, i*i, sep="---")

#2-5######################################################
"""Write a program that uses a for loop to print the
numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89."""

##for i in range(8,90,3):
##    print(i,end=", ")

#2-6######################################################
"""Write a program that uses a for loop to print the
numbers 8, 11, 14, 17, 20, . . . , 83, 86, 89."""

##for i in range(8,90,3):
##    print(i,end=", ")

#2-7######################################################
"""Write a program that uses exactly four for loops to
print the sequence of letters below.
AAAAAAAAAABBBBBBBCDCDCDCDEFFFFFFG"""

##for i in range(10):
##    print("A",end="")
##for i in range(7):
##    print("B", end="")
##for i in range(4):
##    print("CD",end="")
##for i in range(7):
##    if (i==0):
##        print("E",end="")
##    if (i>=1 and i<=5):
##        print("F",end="")
##    if (i==6):
##        print("G")



#2-8######################################################
"""Write a program that asks the user for their name and
how many times to print it. The program should print out
the user’s name the specified number of times."""

##ask_user = input("Please Enter Your Name: ")
##printing_times = eval(input("How many times do you want to print your "))
##for i in range(printing_times):
##    print(ask_user)


#2-9######################################################
"""The Fibonacci numbers are the sequence below, where the
first two numbers are 1, and each number thereafter is the
sum of the two preceding numbers. Write a program that asks
the user how many Fibonacci numbers to print and then
prints that many.
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 . . ."""

##num = eval(input("How many Fibonacci Numbers do you want to Print: "))
##first_number = 1
##second_number = 1
##print(first_number)
##print(second_number)
##for i in range(2,num):
##    next_number =first_number + second_number
##    first_number = second_number
##    second_number = next_number
##    print(next_number)


#2-10######################################################
""" Use a for loop to print a box like the one below. Allow
the user to specify how wide and how high the box should be.
[Hint: print('*'*10) prints ten asterisks.]
*******************
*******************
*******************
*******************

"""

##w=eval(input("How wide is your box: "))
##h=eval(input("How high is your box: "))
##for i in range(h):
##    for j in range(w):
##        print("*",end="")
##    print()
### or:    
####for i in range(h):
####    print("*"*w)


#2-11######################################################
"""Use a for loop to print a box like the one below. Allow
the user to specify how wide and how high the box should be.
*******************
*                 *
*                 *
*******************

"""

##w=eval(input("How wide is your box: "))
##h=eval(input("How high is your box: "))
##for rows in range(h):
##    for cols in range(w):
##        if (rows == 0 or rows == h-1 or cols == 0 or cols == w-1):
##            print("*", end="")
##        else:
##            print(" ", end="")
##    print()

#2-12######################################################
"""Use a for loop to print a triangle like the one below.
Allow the user to specify how high the triangle should be.
*
**
***
****
*****

"""

##n=eval(input("Enter a number to specify how high you want your triangle: "))
##for rows in range (n+1):
##    for colums in range(rows):
##        print("*", end="")
##    print()

#2-13######################################################  
"""Use a for loop to print an upside down triangle like the
one below. Allow the user to specify how high the triangle
should be.
****
***
**
*

"""

##n=eval(input("Enter a number to specify how high you want your triangle: "))
##for rows in range (n,0,-1):
##    for colums in range(rows):
##        print("*", end="")
##    print()

#2-14######################################################    
"""Use for loops to print a diamond like the one below.
Allow the user to specify how high the diamond should be.
For 7:
*
***
*****
*******
*****
***
*

For 8
*
**
***
****
****
***
**
*


   *
  ***
 *****
*******
 *****
  ***
   *

"""

##h=eval(input("How high do you want your diamond: "))
##if(h%2 == 1): # When height is odd 
##    blanks = h//2
##    for i in range(int(h/2+1)):
##        print(" "*blanks + "*"*(2*i+1))
##        blanks-=1  
##    blanks = 1
##    for i in range(int(h/2+1)):
##        print(" "*blanks + "*"*(h-2))
##        blanks+=1
##        h = h-2
##else:  # When height is even
##    blanks = h//2
##    for i in range(int(h/2)):
##        print(" "*blanks + "*"*(2*i+1))
##        blanks-=1  
##    blanks = 1
##    for i in range(int(h/2)):
##        print(" "*blanks + "*"*((h-2)+1))
##        blanks+=1
##        h = h-2
