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
| macro fibo(n::Int64) | |
| f = [0,1] | |
| if n < 0 | |
| print("The input must be equal to or bigger than zero.") | |
| else | |
| for i in 3:n+1 | |
| push!(f, f[i-1] + f[i-2]) | |
| end | |
| end |
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
| function fibo(n::Int64) | |
| f = [0,1] | |
| if n < 0 | |
| print("The input must be equal to or bigger than zero.") | |
| else | |
| for i in 3:n+1 | |
| push!(f, f[i-1] + f[i-2]) | |
| end | |
| end |
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
| macro fibo(n::Int64) | |
| a = 0 | |
| b = 1 | |
| if n < 0 | |
| print("Incorrect Input") | |
| elseif n == 0 | |
| return a | |
| elseif n == 1 | |
| return b | |
| elseif n>1 |
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
| function fibo(n::Int64) | |
| a = 0 | |
| b = 1 | |
| if n < 0 | |
| print("Incorrect Input") | |
| elseif n == 0 | |
| return a | |
| elseif n == 1 | |
| return b | |
| elseif n>1 |
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
| function f(n::Int64) | |
| f = 1 | |
| if n < 0 | |
| print("Factorial does not exist for negative numbers") | |
| end | |
| if n == 0 | |
| print("The factorial of 0 is 1") | |
| end | |
| if n>0 | |
| for i in 1: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
| import seaborn as sns | |
| import matplotlib.pyplot as plt | |
| #Kernel Density Plot | |
| plt.figure(figsize = (12,6)) | |
| sns.kdeplot(data = df[df.stroke == 1], | |
| x = 'age', shade = True, color = 'purple', alpha = 1) | |
| sns.kdeplot(data = df[df.stroke == 0], | |
| x = 'age', shade = True, color = 'darkcyan', alpha = 0.7) | |
| plt.xlabel("Age", fontsize = 15,font = 'monospace') |