impauto
Impauto
Tornar sua vida mais fácil com entradas automatizadas
pip install impautoA maneira 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 ))Você também pode ocultar mensagens de entrada do 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 padrão, ele aumentará uma exceção se houver mais entrada do que o valor fornecido. Para fazer a entrada se repete indefinidamente, você pode 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 repositório é licenciado sob a licença do MIT. Consulte a licença para obter detalhes.