Last active
October 4, 2015 01:49
-
-
Save gnanakeethan/64e8e496630322effdcf to your computer and use it in GitHub Desktop.
Starring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def fib(n): | |
| a =0 | |
| b=1 | |
| i=0 | |
| while i < n: | |
| temp = a | |
| a=b | |
| b = temp+b | |
| i+=1 | |
| return b | |
| print(fib(300)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gates = 10 | |
| bill = range(gates) | |
| for x in bill: | |
| for i in range(1,x): | |
| if(i==1): | |
| print(" "*(gates-x),end="") | |
| if(i==1) or (i==(x-1)): | |
| print("*",end="") | |
| print(" ",end="") | |
| else: | |
| print(" ",end=" ") | |
| print("\n") | |
| bill = range(gates,1,-1) | |
| for x in bill: | |
| for i in range(1,x): | |
| if(i==1): | |
| print(" "*(gates-x),end="") | |
| if(i==1) or (i==(x-1)): | |
| print("*",end="") | |
| print(" ",end="") | |
| else: | |
| print(" ",end=" ") | |
| print("\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| indexes = input().strip().split(); | |
| students = [] | |
| read = 1 | |
| while read: | |
| line = input().strip().split() | |
| try: | |
| if line[0] in indexes: | |
| students.append(line) | |
| print(line) | |
| except IndexError: | |
| value = None | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment