Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Starring
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));
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")
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
You can’t perform that action at this time.