Skip to content

Instantly share code, notes, and snippets.

View rnaeye's full-sized avatar

Erbay Yigit rnaeye

  • New England Biolabs, Inc.
  • MA
  • 22:44 (UTC -05:00)
View GitHub Profile
@rnaeye
rnaeye / exercise1.py
Created September 24, 2016 23:45
exercises
name = input ("Give me your name: ")
print ("Your name is " + name)
age = int(input("Enter your age: "))
print("Your age is " + str(age))
age_at_hundred = (100 - age) + 2016
print ("You will be 100 yeras old in " + str(age_at_hundred))
number = int(input("Entr a number: "))
print("Number you entered " + str(number) + ".")
if number % 2 == 0:
print ("Number is even.")
else:
print("Number is odd.")
@rnaeye
rnaeye / exe3.py
Last active September 24, 2017 15:46
#!/usr/bin/python
mylist = a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
newList = []
for item in mylist:
if item < 5:
print(item)
newList.append(item)
print(newList)
@rnaeye
rnaeye / exercise4.py
Created October 8, 2016 03:19
lesson 4
input_number = input("Enter a number: ")
print ("You entered " + str(input_number))
number = abs(input_number)
x = range (1, number)
divisors =[]
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
common = []
for item in a:
if item in b:
if item not in common:
common.append(item)
print common