-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
73 lines (56 loc) · 1.96 KB
/
main.py
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# Main code ran here
def startup():
print("Selamat datang!")
print("1. Metode Interpolasi Newton")
print("2. Metode Interpolasi Lagrange")
print("3. Metode Interpolasi Spline")
print()
user_input = int(input("Masukkan pilihan Anda : "))
print()
if user_input == 1:
print("Pilih orde polinomial Newton")
print("1. Interpolasi Newton Orde-1")
print("2. Interpolasi Newton Orde-2")
print("3. Interpolasi Newton Orde-3")
user_input = int(input("Masukkan pilihan Anda : "))
print()
if user_input == 1:
import Newton_Interpolation_Orde1
elif user_input == 2:
import Newton_Interpolation_Orde2
elif user_input == 3:
import Newton_Interpolation_Orde3
restart()
elif user_input == 2:
print("Pilih orde polinomial Lagrange")
print("1. Interpolasi Lagrange Orde-1")
print("2. Interpolasi Lagrange Orde-2")
print("3. Interpolasi Lagrange Orde-3")
user_input = int(input("Masukkan pilihan Anda : "))
print()
if user_input == 1:
import Lagrange_Interpolation_Orde1
elif user_input == 2:
import Lagrange_Interpolation_Orde2
elif user_input == 3:
import Lagrange_Interpolation_Orde3
restart()
elif user_input == 3:
print("Pilih orde polinomial spline")
print("1. Interpolasi Spline Orde-1")
print("2. Interpolasi Spline Orde-2")
user_input = int(input("Masukkan pilihan Anda : "))
print()
if user_input == 1:
import Spline_Interpolation_Orde1
elif user_input == 2:
import Spline_Interpolation_Orde2
restart()
else :
raise TypeError
def restart():
print()
user_input = input("Apakah Anda ingin melanjutkan kembali? (y/n) :")
if user_input == "y":
startup()
user_inp = startup()