Can't loop a while loop
up vote
1
down vote
favorite
So I want to do a while loop just to calculate the integral of some random functions. The thing is that when I pass opción = 1 it does the first if (good) but when I pass other number it breaks. Obviously, because True = 1 and False = 0. So how can I do it to do the while loop until (1,2,3) until I press 4... Thanks you so much in advance while opcion == True: if opcion == 1: print('Vamos a calcular la siguiente integral:') f = a*x + b integral = sp.Integral(f, x) sp.pprint(integral) print() print('Que tiene como resultado:') sp.pprint(sp.integrate(f,x)) print() print('Introducimos los límites y valores de las' ' constantes para caluclarl