写一个程序，以序列方式显示斐波那契数列。
给定一个正整数n，表示需要显示的斐波那契数列的前n项。
以下是Python代码实现：

```
n = int(input("Enter the number of terms: "))
a, b = 0, 1
count = 0

if n <= 0:
   print("Please enter a positive integer")
elif n == 1:
   print("Fibonacci sequence upto",n,":")
   print(a)
else:
   print("Fibonacci sequence:")
   while count < n:
       print(a)
       nth = a + b
       a = b
       b = nth
       count += 1
```

输出：

```
Enter the number of terms: 10
Fibonacci sequence:
0
1
1
2
3
5
8
13
21
34
```