forked from tanmaysonar/pro1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile.py
More file actions
34 lines (25 loc) · 641 Bytes
/
while.py
File metadata and controls
34 lines (25 loc) · 641 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#import series
from testing.matlib.series import fibo, even
import testing.matlib.math_ops as mo
import math
print math.pi
while True:
print '1. Fibo Series'
print '2. Even Series'
print '3. Even or Odd'
print '4. Exit'
choice = int(raw_input('What is your choice: '))
if choice != 4:
n = int(raw_input('Enter the value of N: '))
if choice == 1:
print fibo(n)
elif choice == 2:
print even(n)
elif choice == 3:
if mo.evenodd(n):
print 'is even'
else:
print 'is odd'
else:
break
#add python path to the modules