impauto
Impauto
Hacer su vida más fácil con entradas automatizadas
pip install impautoLa forma básica de usar este módulo
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 154 )
# use your script as normal
def syracuse ( x ):
step = 0
while x != 1 :
x = ( 3 * x + 1 ) if x % 2 else ( x // 2 )
step += 1
return step
n = int ( input ( "Enter a number: " ))
print ( syracuse ( n ))También puede ocultar mensajes de entrada de terminal
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( 1 , 2 , 3 , show_message = False )Por defecto, aumentará una excepción si hay más entrada que valor dado. Para hacer repeticiones de entrada indefinidamente, puede usar este código
from impauto import Automated
# Each argument passed will be enter as a str to the input function.
Automated ( "a" , "b" , forever = True )© 2020 Copyright Edhyjox
Este repositorio tiene licencia bajo la licencia MIT. Vea la licencia para más detalles.