# Daniel Foster
# 06/06/2024
# For Loop Examples

# Repeat the same block of code 10 times.
for i in range(10):
    print("Hello there!")
    print("How are you?")


#count = int(input("Enter a number: "))

# Count from 0 to 9.
# i is set to 0.
# Every time we run the inside of the loop,
# i is increased by 1.
# We do this until i is equal to the number at the top.
for i in range(10):
    print(i)

#This line is NOT in the for loop.
print("This line only prints once.")


# Print all odd numbers between 1 and 10.
for i in range(1, 10, 2):
    print(i)

print("============================")
# Print the sum of all the numbers between 0-9.
print("Sum of all numbers between 0-9")
total = 0
for i in range(10):
    total += i
    print(total)


print("============================")
number = int(input("Enter a number: "))
power = int(input("Enter a power: "))
result = 1
for i in range(power):
    result *= number

#print(result)

print("============================")
number2 = 1
for i in range(7, 0, -1):
    number2 *= i
    print(number2)
