Question: Python Challenge > Editor Python 3 1 import sys 2 for line in sys.stdin: 3 print(line, end=) 4 Fibonacci Series Programming challenge description: The Fibonacci

Python Challenge > Editor Python 3 1 import sys 2 for line in sys.stdin: 3 print(line, end="") 4 Fibonacci Series Programming challenge description: The Fibonacci series is defined as F(0) = 0; F(1) = 1; F(n) = F(n-1) + F(n-2) where n>1. Given a positive integer n, print the value of Fin). Input: Your program should read lines of text from standard input. Each line will contain a single positive integer, n. Output: For each input n, print to standard output the fibonacci number, F(n), one per line. Test 1 Test Input 5 >_ Test Case Output Expected Output 5 No results to display. Click code. Test 2 Test Input 12 Expected Output 144
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
