lesson_11_ex_2_17_18

# -*- coding: utf-8 -*-
"""
Created on Thu May 31 18:13:54 2018

@author: stkarlos
"""

def discrete_maths(start , stop , show = False):
  k = []
  for i in range(start , stop + 1):
    j = str(i)
    if (int(j[0]) % 2 == 0) and int(j[0]) != 0 :
      if int(j[-1]) % 2 == 1:
        k.append(i)
  if show != False:
    print k
  return len(k)

a = 100
b = 999
print discrete_maths(a,b)

 

Posted in Uncategorized