# Algorithm 1
# Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”.

def numword():
    return ["Fizz" if x % 3 == 0  "Buzz" if x % 5 == 0 for x in range(1, 101)]

print(numword())

def numword2():
    array = []
    for x in range(1, 101):
        if x % 3 == 0:
            array.append("Fizz")
        if x % 5 == 0:
            array.append("Buzz")
        if x % 3 == 0 and x % 5 == 0:
            array.append("FizzBuzz")
        else:
            array.append(x)
    print(array)

numword2()

# Algorithm 2
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

# Find the sum of all the multiples of 3 or 5 below 1000.

def sumodulo():
    array = []
    for x in range(1,1001):
        if x % 3 == 0 and x % 5 == 0:
            array.append(x)
    print(sum(array))

sumodulo()



# Algorithm 3
# Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:

# 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

# By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.

def fibonacci():
  fibarray = [1, 2]
  sum = 2
  for x in range(0,10):
    addtoarray = fibarray[x] + fibarray[x + 1]
    fibarray.append(addtoarray)
    if addtoarray % 2 == 0 and addtoarray < 4000000:
      sum += addtoarray
  print(sum)

fibonacci()









# r1 = ''.join(sorted(str1))
# r2 = ''.join(sorted(str2))

str1 = 'asdfghjkl'
str2 = 'asdfghjmkl'

count1 = 0
count2 = 0

for x in str2:
  if x in str1:
    pass
  else:
    print(x)




# def findit():
#   l = list(range(1, 50))
#   ans = 1000
#   x = 0
#   y = 1
#   z = 2
#   a = x * x
#   b = y * y
#   c = z * z
#   for p in l:
#     x+=1
#     y+=1
#     z+=1
#     if a + b + c == ans:
#       print(ans)
#     else:
#       print('not yet')

# findit()

chemicals = ['Amazon', 'Microsoft', 'Google'] 
symbols = ['I', 'Amazon', 'cro', 'Na', 'le', 'abc']

nums = [1,2,3]

ans = dict(zip(nums, chemicals))

print('Am' in iter(ans.values()))

# for x in symbols:
#   if len(x) > 1 and x in ans.values():
#     print(x)