Skip to content

Instantly share code, notes, and snippets.

View sirishaditya's full-sized avatar

Sirish Aditya sirishaditya

View GitHub Profile
Verifying my Blockstack ID is secured with the address 14rRyyWTeDBbTuqeKP9AGbevB5rdT6MLBF https://explorer.blockstack.org/address/14rRyyWTeDBbTuqeKP9AGbevB5rdT6MLBF
@sirishaditya
sirishaditya / fibonacci.py
Created June 27, 2016 06:53
PracticePython.Org- 13 Fibonacci
def fib(n):
a = 0
b = 0
c = 1
print (a,b)
for i in range(n-2):
print (c,end=',')
a = b
b = c
@sirishaditya
sirishaditya / listcomprehensions.py
Created June 27, 2016 06:40
PracticePython.Org- 07 List Comprehensions
print ([even for even in a if even % 2 == 0])
@sirishaditya
sirishaditya / charinput.py
Created June 27, 2016 05:17
PracticePython.Org- 01CharacterInput
import datetime
name = input("Enter your name: ")
age = int(input("Enter your age: "))
now = datetime.datetime.now()
this_year = now.year
year_100 = this_year+(100-age)
@sirishaditya
sirishaditya / listends.py
Created June 27, 2016 04:47
PracticePython.Org-12 List Ends
def listEnds(some_list):
list_2 = []
list_2.append(some_list[0])
list_2.append(some_list[-1])
print(list_2)
some_list = input()
listEnds(some_list)