Program to print Fibonacci series up to given n numbers.
Num=int(input("Enter n Number: ")) s=1 temp1=0 temp=0 for i in range(Num): if(i<2): print(i) else: temp=temp1+s temp1=s s=temp print(temp)
Input:
Enter n Number: 10
Output:
0
1
1
2
3
5
8
13
21
34
Output:
Enter n Number: 10
0
1
1
2
3
5
8
13
21
34
Output:
Enter n Number: 5
0
1
1
2
3
Output:
Enter n Number: 20
0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
More Codes to Fcuk
- Armstrong Number
- Find the biggest even number
- Program to replace every element on right side
- Compute the frequency of the note
- Print all Possible Combinations from three Digits.
- Get number n and Compute n+nn+nnn
- Print Cube root of the given number
- Convert number into binary, octal and hexa
- Return maximum number of operations performed on array.
- Determine the encryption key
- Find the count of numbers having a prime number in their binary representation.
- Fibonacci Series up to given n numbers
- Help Alice find the route to her home
Explore
- Quantum Mechanics relation with quantum computing
- Unzipping Files using Python
- An Algorithm which accepts n integer values and calculates the average and prints it.
- How can Quantum Computing merge with Virtual Reality ? !
- Blockchain and Cryptocurrency. And their relations with Virtual Reality !!