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
| from flask import Flask | |
| from flask_restful import Api, Resource, reqparse | |
| app = Flask(__name__) | |
| api = Api(app) | |
| users = [ | |
| { | |
| "name": "Nicholas", | |
| "age": 42, |
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
| int fibonacci(int n) | |
| { | |
| if(n<=1) | |
| return n; | |
| else | |
| return (fibonacci(n-1)+fibonacci(n-2)); | |
| } |
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 fib(n){ | |
| var curr=1; | |
| var prev=0; | |
| var next; | |
| for(var i=0;i<n;i++){ | |
| document.write(" "); | |
| document.write(curr); | |
| next=curr+prev; | |
| prev=curr; | |
| curr=next; |