I want to print the numbers in the same line to Fibonacci numbers.
Here is my code:
n = int(input("Enter n: "))
a = 0
b = 1
sum = 1
count = 1
print("Fibonacci numbers= ")
while(count < n):
print(sum, end = " ")
count += 1
a = b
b = sum
sum = a + b
The output of this will be: Enter n: 10 Fibonacci numbers=
1 2 3 5 8 13 21 34 55 >
How do I put it like this: Enter n: 10
Fibonacci numbers= 1 2 3 5 8 13 21 34 55
Thanks.