Write a function to compute the nth Fibonacci number. Use your function to solve Programming Exercise 3 from Chapter 3.
Exercise 3:
Write a program that determines the molecular weight of a hydrocarbon based on the number of hydrogen, carbon, and oxygen atoms. You should use the following weights:
![1727_e2f66a0c-6eba-4b80-8fc5-b7a518a554d2.png](https://secure.tutorsglobe.com/CMSImages/1727_e2f66a0c-6eba-4b80-8fc5-b7a518a554d2.png)