This file contains 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
# We all know the Series starts with 0 and 1 | |
temp = [0,1] # you can change to [1,1], [20,21] anything , first 2 values should be there | |
# then we are just adding the 1st ith and 2nd ith but plus 1 | |
[ temp.append( temp[i]+ temp[i+1] ) for i in range(10) ] | |
print(temp) | |
#----------------------output-----------------------# | |
# [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] |
This file contains 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
# Import the required libraries | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import datasets | |
import pandas as pd | |
from collections import defaultdict | |
from math import sqrt | |
from collections import Counter | |
from sklearn.model_selection import train_test_split |