Thursday, 11 March 2021

Class 12 IP Practical - 06


#6 - First 10 terms of Fibonacci series are stored in a list namely fib:          


fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]


Write a program to plot Fibonacci terms and their square-roots with two separate lines on the same plot.

(a)    Series should be plotted as a cyan line with ‘o’ markers having size as 5 and edge-color as red.

(b)   The square-root series should be plotted as a black line with ‘+’ markers having size as 7 and edge-color as red.



import matplotlib.pyplot as plt

import numpy as np





plt.xlabel("X Axis")

plt.ylabel("Y Axis")

plt.title("Fibonacci Series")



No comments:

Post a Comment