Skip to content

Instantly share code, notes, and snippets.

View sumon328's full-sized avatar

sumon328

  • Bangladesh
View GitHub Profile
print("\n___________Welcome to List Overlap Comprehensions Solutions #Exercise 10 ___________")
import random
a = [random.randrange(1, 10) for _ in range(0, random.randint(1,20))]
b = [random.randrange(1, 10) for _ in range(0, random.randint(1,20))]
c = []
c = [a[i] for i in range(0, len(a)) if (a[i] not in c and a[i] in b)]
print(a)
print(b)
# Generate a random number between 1 and 9 (including 1 and 9). Ask the user to guess the number, then tell them whether they guessed too low, too high, or exactly right. (Hint: remember to use the user input lessons from the very first exercise)
# # Extras:
#
# Keep the game going until the user types “exit”
# Keep track of how many guesses the user has taken, and when the game ends, print this out.
# In[209]:
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
print([x for x in a if x % 2 == 0])
print("\n___________Welcome to palindrome word Finder___________")
word = input("Enter the word :")
x = word
y = word[::-1]
if x == y:
print("This is an palindrome !")
else:
@sumon328
sumon328 / extract_features.py
Created August 16, 2020 16:23 — forked from Justin-Heer/extract_features.py
extract_features
def extract_features(iDirName, cnn_model):
# get face detector from dlib and initialize the face aligner
detector = dlib.get_frontal_face_detector()
# open the video file
iFramePaths = [os.path.join(iDirName, iFramePath) for iFramePath in os.listdir(iDirName)]
# an empty list to hold the results
features = []
# process each frame
a=a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b=b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
c=[]
for item in a:
if item in b:
if item not in c:
c.append(item)
print (c)
print("\n___________Welcome to Divisor Finder___________")
__author__ = 'jeffreyhunt'
num = int(input("Please choose a number to divide: "))
listRange = list(range(1,num+1))
divisorList = []
a=[1,1,2,3,5,8,13,21,34,55,89]
print([x for x in a if x < 10])
num = int(input('Enter a number:'))
if num % 2==0:
print('The number you enter is even! ')
else:
print('the number you enter is Odd')