-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.py
More file actions
36 lines (29 loc) · 717 Bytes
/
Copy pathMain.py
File metadata and controls
36 lines (29 loc) · 717 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
35
36
import MachineNumber
import LinearSolver
def menu():
print "\t\t\t Bienvenidos al Paquete de Analisis Numerico"
flag = 1
while flag:
print "Elija el programa:\n"
print """
1. Numeros de maquina
2. Resolucion de sistemas lineales.
3. Salir
"""
opc = input('Ingrese opcion\n')
if type(opc) != type(1):
print 'Debe ingresar un valor entero, vuelva a intentarlo'
continue
if opc == 1:
MachineNumber.menu()
elif opc == 2:
LinearSolver.menu()
elif opc == 3:
print 'Gracias por usar el programa'
flag = 0
else:
print 'Opcion incorrecta'
#Para sistemas windows
opc = raw_input('Fin del programa, presione enter')
if __name__ == '__main__':
menu()